当前位置: 首页>>技术教程>>正文


目前尚未安装’curl’程序

ubuntuer 技术教程 , 去评论

问题描述

我正在尝试Meteor http://meteor.com/examples/leaderboard

我必须使用CURL,我在Windows上熟悉它。

现在我尝试在Ubuntu 12.04上安装它。

但我得到这些错误:

kevin@ubuntu:~$ curl https://install.meteor.com | sh
The program 'curl' is currently not installed.  You can install it by typing:
sudo apt-get install curl
kevin@ubuntu:~$ apt-get curl
E: Invalid operation curl
kevin@ubuntu:~$ sudo apt-get curl
[sudo] password for kevin: 
E: Invalid operation curl

我如何安装CURL?

解决了它:

我做了这个命令

sudo sed -i -e 's/us.archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list

然后我可以做sudo apt-get update然后sudo apt-get install curl

哪个成功安装了curl。

更新:

抱歉明显的错误。我昨天也尝试了,在那里我输入了正确的命令,给了我这个错误信息:

kevin@ubuntu:~$ sudo apt-get install curl
[sudo] password for kevin: 
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

更新2:

尝试了apt-cache search curl | grep -i curl命令

kevin@ubuntu:~$ apt-cache search curl | grep -i curl
curlftpfs - filesystem to access FTP hosts based on FUSE and cURL
flickcurl-doc - utilities to call the Flickr API from command line - documentation
flickcurl-utils - utilities to call the Flickr API from command line
gambas2-gb-net-curl - The Gambas advanced networking component
gnupg-curl - GNU privacy guard - a free PGP replacement (cURL)
libcupt2-0-downloadmethod-curl - alternative front-end for dpkg -- libcurl download method
libcurl-ocaml - OCaml curl bindings (Runtime Library)
libcurl-ocaml-dev - OCaml libcurl bindings (Development package)
libflickcurl-dev - C library for accessing the Flickr API - development files
libflickcurl0 - C library for accessing the Flickr API
libflickcurl0-dbg - C library for accessing the Flickr API - debugging symbols
libghc-curl-dev - GHC libraries for the libcurl Haskell bindings
libghc-curl-doc - Documentation for the libcurl Haskell bindings
libghc-curl-prof - Profiling libraries for the libcurl Haskell bindings
libghc-download-curl-dev - High-level file download based on URLs
libghc-download-curl-doc - High-level file download based on URLs; documentation
libghc-download-curl-prof - High-level file download based on URLs; profiling libraries
libghc-hxt-curl-dev - LibCurl interface for HXT
libghc-hxt-curl-doc - LibCurl interface for HXT; documentation
libghc-hxt-curl-prof - LibCurl interface for HXT; profiling library
libghc6-curl-dev - transitional dummy package
libghc6-curl-doc - transitional dummy package
libghc6-curl-prof - transitional dummy package
liblua5.1-curl-dev - libcURL development files for the Lua language version 5.1
liblua5.1-curl0 - libcURL bindings for the Lua language version 5.1
libwww-curl-perl - Perl bindings to libcurl
slang-curl - transfer files using HTTP and FTP from S-Lang
spl-curl - SPL Programming Language -- curl adapter
tclcurl - Tcl bindings to libcurl
xmms2-plugin-curl - XMMS2 - curl transport for HTTP
php5-curl - CURL module for php5
libcurl3-gnutls - Multi-protocol file transfer library (GnuTLS)
libcurl3-nss - Multi-protocol file transfer library (NSS)
python-pycurl - Python bindings to libcurl
libcurl3 - Multi-protocol file transfer library (OpenSSL)

更新3:在运行之前更新了sudo apt-get update

但这并没有让人伤心。

kevin@ubuntu:~$ sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
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

Package libcurl3-dev 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
E: Package 'libcurl3-dev' has no installation candidate

最佳解决办法

答案不同的更新

第一个问题

你需要这个命令

sudo apt-get install curl

您使用的命令中缺少安装:sudo apt-get curl将无法工作,因为apt-get没有命令curl

第一次更新

您还想先运行update

sudo apt-get update

您可能需要考虑使用此命令:

sudo apt-get install libcurl3 php5-curl

它可能还与您使用的php版本有关(php5-common?)请参阅here

第二次更新

或者,为了更容易使用命令wget https://install.meteor.com | sh。 Curl用于早期版本的ubuntu。它不是一个必不可少的工具,但有些教程确实使用它。

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/1736.html,未经允许,请勿转载。