无法在 Linux Mint 上安装 cURL

无法在 Linux Mint 上安装 cURL

我正在尝试安装卷曲为了能够安装红宝石版本管理器。

我这样写:

sudo apt-get update && apt-get install curl

并得到这个输出:

E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

然后我这样写:

须藤 rm /var/lib/apt/lists/lock

须藤 rm /var/cache/apt/archives/lock

然后我重复安装 cURL 并得到:

E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

更新:

输出为

 $ sudo apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  curl
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
Need to get 179 kB of archives.
After this operation, 373 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  curl
Install these packages without verification [y/N]? y
Err http://archive.ubuntu.com/ubuntu/ natty-updates/main curl i386 7.21.3-1ubuntu1.2
  404  Not Found [IP: 91.189.91.14 80]
Err http://security.ubuntu.com/ubuntu/ natty-security/main curl i386 7.21.3-1ubuntu1.2
  404  Not Found [IP: 91.189.88.149 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.21.3-1ubuntu1.2_i386.deb  404  Not Found [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

-

更新2:

我在用Linux薄荷11 (Rosinka),我已连接到互联网。

答案1

您正在那里运行两个单独的命令:apt-get updateapt-get install curl。简单&&地链接两个命令,这意味着“如果第一个命令成功,则运行第二个命令。这两个命令都需要以 root 用户身份运行,这是通过附加sudo到它们来完成的,但您只运行第一个命令sudo,而不是第二,你要找的是。

sudo apt-get update && sudo apt-get install curl

此外,似乎还有其他东西正在后台安装某些东西。停止可能正在使用的任何其他进程dpkg。最后,由于您还收到有关某些索引文件未下载的错误,因此请删除&&.相反运行:

sudo apt-get update; sudo apt-get install curl

答案2

apt-get用于dpkg安装软件包。

看起来另一个进程正在使用 dpkg,请确保您没有同时从 (GUI) 软件管理器安装某些内容,或者确保您没有在后台升级软件包。

相关内容