如何让CLI curl在debian lenny上运行

如何让CLI curl在debian lenny上运行,curl,debian,Curl,Debian,我有一台运行debian lenny的机器。 我需要能够从命令行使用curl,但它不可用。 当我尝试使用它时,我得到: curl: command not found 我需要安装什么才能使用此命令 更新: 我试图运行apt get install curl 并得到以下结果: xxxxx:~# apt-get install curl Reading package lists... Done Building dependency tree Reading state information

我有一台运行debian lenny的机器。
我需要能够从命令行使用curl,但它不可用。
当我尝试使用它时,我得到:

curl: command not found
我需要安装什么才能使用此命令

更新:

我试图运行
apt get install curl
并得到以下结果:

xxxxx:~# apt-get install curl

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  lockfile-progs liblockfile1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  ca-certificates libcurl3 libldap-2.4-2 libssh2-1 openssl
The following NEW packages will be installed:
  ca-certificates curl libcurl3 libldap-2.4-2 libssh2-1 openssl
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 1877kB of archives.
After this operation, 4583kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://security.debian.org stable/updates/main libldap-2.4-2 2.4.11-1+lenny1
  404 Not Found [IP: 128.31.0.36 80]
Err http://security.debian.org stable/updates/main libcurl3 7.18.2-8lenny4
  404 Not Found [IP: 128.31.0.36 80]
Err http://security.debian.org stable/updates/main curl 7.18.2-8lenny4
  404 Not Found [IP: 128.31.0.36 80]
Err http://mirror.cc.columbia.edu lenny/main openssl 0.9.8g-15+lenny6
  404 Not Found
Get:1 http://mirror.cc.columbia.edu lenny/main ca-certificates 20080809 [151kB]
Err http://security.debian.org stable/updates/main openssl 0.9.8g-15+lenny6
  404 Not Found [IP: 128.31.0.36 80]
Get:2 http://mirror.cc.columbia.edu lenny/main libssh2-1 0.18-1 [64.3kB]
Fetched 215kB in 0s (391kB/s)
Failed to fetch http://security.debian.org/pool/updates/main/o/openldap/libldap-2.4-2_2.4.11-1+lenny1_i386.deb  404 Not Found [IP: 128.31.0.36 80]
Failed to fetch http://security.debian.org/pool/updates/main/o/openssl/openssl_0.9.8g-15+lenny6_i386.deb  404 Not Found [IP: 128.31.0.36 80]
Failed to fetch http://security.debian.org/pool/updates/main/c/curl/libcurl3_7.18.2-8lenny4_i386.deb  404 Not Found [IP: 128.31.0.36 80]
Failed to fetch http://security.debian.org/pool/updates/main/c/curl/curl_7.18.2-8lenny4_i386.deb  404 Not Found [IP: 128.31.0.36 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
xxxxx:~#
# the main Debian packages.
deb http://mirror.cc.columbia.edu/pub/linux/debian/debian/ lenny main contrib
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
# deb-src http://mirror.cc.columbia.edu/pub/linux/debian/debian/ lenny main contrib
# uncommenting the following line will enable security updates
deb http://security.debian.org/ stable/updates main contrib

# for sun-java5 packages in unstable
deb http://ftp.debian.org/debian/ unstable non-free
deb-src http://ftp.debian.org/debian/ unstable non-free
所以我试过了

xxxxx:~# apt-get update
Get:1 http://mirror.cc.columbia.edu lenny Release.gpg [1034B]
Get:2 http://mirror.cc.columbia.edu lenny Release [85.6kB]
Get:3 http://security.debian.org stable/updates Release.gpg [836B]
Get:4 http://security.debian.org stable/updates Release [86.9kB]
Ign http://mirror.cc.columbia.edu lenny Release
Get:5 http://ftp.debian.org unstable Release.gpg [836B]
Ign http://mirror.cc.columbia.edu lenny/main Packages/DiffIndex
Ign http://mirror.cc.columbia.edu lenny/contrib Packages/DiffIndex
Ign http://security.debian.org stable/updates Release
Get:6 http://mirror.cc.columbia.edu lenny/main Packages [6873kB]
Get:7 http://ftp.debian.org unstable Release [188kB]
Ign http://security.debian.org stable/updates/main Packages/DiffIndex
Ign http://security.debian.org stable/updates/contrib Packages/DiffIndex
Get:8 http://security.debian.org stable/updates/main Packages [236kB]
Get:9 http://security.debian.org stable/updates/contrib Packages [622B]
Ign http://ftp.debian.org unstable Release
Get:10 http://ftp.debian.org unstable/non-free Packages/DiffIndex [2023B]
Get:11 http://ftp.debian.org unstable/non-free Sources/DiffIndex [2023B]
Get:12 http://ftp.debian.org unstable/non-free Packages [150kB]
Get:13 http://mirror.cc.columbia.edu lenny/contrib Packages [94.3kB]
Get:14 http://ftp.debian.org unstable/non-free Sources [121kB]
Fetched 7842kB in 3s (2421kB/s)
Reading package lists... Done
W: GPG error: http://mirror.cc.columbia.edu lenny Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
W: GPG error: http://security.debian.org stable/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
W: GPG error: http://ftp.debian.org unstable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
W: You may want to run apt-get update to correct these problems
然后

xxxxx:~# apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  curl: Depends: libcurl3 (>= 7.16.2-1) but it is not going to be installed
E: Broken packages
其次是:

xxxxx:~# apt-get remove curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package curl is not installed, so not removed
The following packages were automatically installed and are no longer required:
  lockfile-progs liblockfile1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 50 not upgraded.

我一定错过了一些重要的事情

还有一个更新:

下面是运行apt get install libcurl3时的说明

xxxxx:~# apt-get install libcurl3
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  libcurl3: Depends: libgssapi-krb5-2 (>= 1.7+dfsg) but it is not installable
            Depends: libidn11 (>= 1.13) but 1.8+20080606-1 is to be installed
            Depends: libssh2-1 (>= 1.2) but it is not going to be installed
E: Broken packages
sources.list文件具有以下内容:

xxxxx:~# apt-get install curl

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  lockfile-progs liblockfile1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  ca-certificates libcurl3 libldap-2.4-2 libssh2-1 openssl
The following NEW packages will be installed:
  ca-certificates curl libcurl3 libldap-2.4-2 libssh2-1 openssl
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 1877kB of archives.
After this operation, 4583kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://security.debian.org stable/updates/main libldap-2.4-2 2.4.11-1+lenny1
  404 Not Found [IP: 128.31.0.36 80]
Err http://security.debian.org stable/updates/main libcurl3 7.18.2-8lenny4
  404 Not Found [IP: 128.31.0.36 80]
Err http://security.debian.org stable/updates/main curl 7.18.2-8lenny4
  404 Not Found [IP: 128.31.0.36 80]
Err http://mirror.cc.columbia.edu lenny/main openssl 0.9.8g-15+lenny6
  404 Not Found
Get:1 http://mirror.cc.columbia.edu lenny/main ca-certificates 20080809 [151kB]
Err http://security.debian.org stable/updates/main openssl 0.9.8g-15+lenny6
  404 Not Found [IP: 128.31.0.36 80]
Get:2 http://mirror.cc.columbia.edu lenny/main libssh2-1 0.18-1 [64.3kB]
Fetched 215kB in 0s (391kB/s)
Failed to fetch http://security.debian.org/pool/updates/main/o/openldap/libldap-2.4-2_2.4.11-1+lenny1_i386.deb  404 Not Found [IP: 128.31.0.36 80]
Failed to fetch http://security.debian.org/pool/updates/main/o/openssl/openssl_0.9.8g-15+lenny6_i386.deb  404 Not Found [IP: 128.31.0.36 80]
Failed to fetch http://security.debian.org/pool/updates/main/c/curl/libcurl3_7.18.2-8lenny4_i386.deb  404 Not Found [IP: 128.31.0.36 80]
Failed to fetch http://security.debian.org/pool/updates/main/c/curl/curl_7.18.2-8lenny4_i386.deb  404 Not Found [IP: 128.31.0.36 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
xxxxx:~#
# the main Debian packages.
deb http://mirror.cc.columbia.edu/pub/linux/debian/debian/ lenny main contrib
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
# deb-src http://mirror.cc.columbia.edu/pub/linux/debian/debian/ lenny main contrib
# uncommenting the following line will enable security updates
deb http://security.debian.org/ stable/updates main contrib

# for sun-java5 packages in unstable
deb http://ftp.debian.org/debian/ unstable non-free
deb-src http://ftp.debian.org/debian/ unstable non-free

您可以通过aptitude安装它:


sudo apt get install curl

编辑您的源代码。例如,(deb wheeezy contrib main non free),然后尝试更新您的包源代码(
apt get update
),(
apt get upgrade
)以升级您的debian。之后,重新安装curl(
apt get install curl
)。

ubuntu/debian使用:
apt get update-y&&apt get install curl-y

centos使用:
yum更新-y&&yum安装curl-y


from:

运行apt get install libcurl3时会显示什么?您的软件包源似乎有问题(请查看上次的输出:[…]如果您使用的是不稳定的发行版,某些必需的软件包尚未创建或移出传入的[…])。我会尝试再次更新它们(
apt get update
),并查找错误。您还可以尝试生成新的
源代码。为您的发行版列出
(),更新源代码,然后重新安装。希望有帮助。我已经做了一个
apt-get-update
-查看评论中的第二个灰色块。它似乎有一些PGP问题接近尾声,你知道这些是什么意思吗?我猜PGP警告与你的问题没有直接关系。您可以在中阅读更多关于它的信息。你能发布你的
来源。列表
文件吗?添加了来源的内容。列表你知道这几乎是7年前回答的吗?