我是 Ubuntu 新手。我使用 putty 连接并运行命令。我拥有 SUDO 用户权限,操作系统详细信息如下:
名称=“Ubuntu”版本=“18.04.3 LTS (Bionic Beaver)”
我正在尝试安装 build-essential 但出现以下错误:
命令:sudo apt install build-essential
Reading package lists... Done <br />
Building dependency tree <br />
Reading state information... Done <br />
Package build-essential is not available, but is referred to by another package. <br />
This may mean that the package is missing, has been obsoleted, or is only available from another source <br />
E: Package 'build-essential' has no installation candidate
我已经运行了同样的操作,但没有使用 sudo 关键字
命令:apt install build-essential,但低于错误
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) <br />
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? <br />
此后我尝试使用以下命令更新 apt-get:
命令:sudo apt-get update
结果:
Err:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease 401 Authorization Required [IP: 10.15.0.115 8080] <br />
Err:2 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
401 Authorization Required [IP: 10.15.0.115 8080] <br />
Err:3 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
401 Authorization Required [IP: 10.15.0.115 8080] <br />
Err:4 http://archive.canonical.com/ubuntu bionic InRelease
401 Authorization Required [IP: 10.15.0.113 8080] <br />
以上错误只是一个快照(由于链接数量超出限制)
我遇到了上述授权问题。有人能告诉我为什么我会遇到此授权问题以及如何解决这些问题吗?
答案1
请尝试使用其他网络。有时由于代理限制(例如办公室网络),我们没有权限从此类网站下载。