我想安装Brave浏览器,但是无法安装curl。
上一个问题建议我切换到另一个 ubuntu 镜像。我切换到了最好的服务器,但什么都没有改变。
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package curl 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 'curl' has no installation candidate
更新后得到以下结果:
Hit:1 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
apt policy ubuntu-desktop
给出
ubuntu-desktop:
Installed: 1.450.1
Candidate: 1.450.1
Version table:
*** 1.450.1 100
100 /var/lib/dpkg/status
Kulfy,谢谢你。我必须先运行这些行,然后才能安装
apt remove -y libcurl4
apt install -y libcurl4 curl
Ruby,谢谢。此时,正在安装浏览器。我根据此答案修复了该问题 https://askubuntu.com/a/1051988/1100108 不确定您的解决方案是否会导致同样的结果,但现在一切都很好。
答案1
这是您的存储库的问题,curl
在 Ubuntu 主目录中可用。您需要更新您的存储库。打开终端并运行
nano /etc/apt/sources.list
更新您的存储库并运行
sudo apt-get update
sudo apt-get install curl