IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Package xxx has no installation candidate on Raspberry Pi

    R0uter发表于 2022-09-12 04:22:21
    love 0

    去落格博客阅读完整排版的Package xxx has no installation candidate on Raspberry Pi

    最近更新:12th 9月, 2022

    当新刷好的树莓派镜像启用时,你有可能会遇到奇怪的 apt 错误:

    root@raspberrypi:/home/pi# apt install default-jre
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Package default-jre is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    E: Package 'default-jre' has no installation candidate

    当然,不止这一个,安装任何包都会是 Package xxx has no installation candidate

    解决办法

    首先查看你的 /etc/apt/sources.list ,看看里边的源地址是不是都被注释掉了,这里我的是正常的。

    那应该就是 apt 缓存的问题,到目录 /var/lib/apt 执行命令 sudo rm -r lists

    删除全部缓存,然后执行 sudo apt update

    此时 apt 应该就可以正确安装各种包了。

    Package xxx has no installation candidate on Raspberry Pi,首发于落格博客。

    其他推荐:
    1. 如何在国内使用 gem
    2. 如何让 NSWindow 显示在不同的 Space 或者 Screen 中
    3. 方便快捷 自用 搭建 TimeMachine 方案
    4. 如何 在 Kali Linux 中 安装 Parallels Tools
    5. numlockx 解决ubuntu下小键盘灯启动不亮



沪ICP备19023445号-2号
友情链接