80

I am trying out Meteor http://meteor.com/examples/leaderboard

I have to use CURL, which I am familiar with on Windows.

Now I try to install it on Ubuntu 12.04.

But i get these errors:

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

How do i install CURL?

SOLVED IT:

I did this command

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

and then I could do sudo apt-get update and then sudo apt-get install curl

which successfully installed curl.

UPDATE:

Sorry for the obvious mistake. I tried yesterday also, and there I did type the right command which, gave me this error message:

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

UPDATE 2:

Tried the apt-cache search curl | grep -i curl command

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)

UPDATE 3: Did update do sudo apt-get update before i run it.

But this did not help sadly.

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
MadMike
  • 4,244
  • 8
  • 28
  • 50
  • What does
    `apt-cache search curl | grep -i curl`
    
    

    say?

    – catalesia Feb 22 '13 at 10:34
  • Tried it, my update 2. – Kevin Simper Feb 22 '13 at 10:41
  • you could always download it yourself from http://curl.haxx.se/download.html and build it. Have you changed your repositories? I can get it no problem, no error whatsoever. What interests me is why apt would give you results and then not allow to install. Do you experience the same with any other software? – catalesia Feb 22 '13 at 10:52
  • 1
    Please include the output from sudo apt-get update. I think your system is missing some software repositories. – Jorge Suárez de Lis Feb 22 '13 at 10:58
  • I have not really changed anything, not installed any programs either. Pretty much fresh install. Therefore i do not understand it really either. I do not have any idea how to build curl myself sadly. – Kevin Simper Feb 22 '13 at 10:59

2 Answers2

119

Answers to the different updates

First question

You need the command

sudo apt-get install curl

The install is missing in the command you use: sudo apt-get curl won't work because apt-get does not have a command curl.

First update

Also you want to run update first:

sudo apt-get update

And you might want to consider using this command:

sudo apt-get install libcurl3 php5-curl

It might also relate to the version of php you use (php5-common?) See here.

Second update

Or, to make it easier just use the command wget https://install.meteor.com | sh. Curl was used on earlier versions of ubuntu. It is not really an essential tool, but some tutorials use it indeed.

don.joey
  • 28,662
  • I have updated my post with the error that i intended to show. Thank you for your help! – Kevin Simper Feb 22 '13 at 10:22
  • Tried it and still errors. My update 3. – Kevin Simper Feb 22 '13 at 10:42
  • Did you read the link I gave you? I might be related to the version of php you use. Also did php5-curl install? If so, your problem is solved right? – don.joey Feb 22 '13 at 10:46
  • Yes, php5-curl did install. I did not understand the solution in that post: "You either need to replace PHP with the version from the official Ubuntu repositories". What does that mean? I do not need PHP. I have installed all updates to Ubuntu there is. Have not installed any programs yet. – Kevin Simper Feb 22 '13 at 10:55
  • try whether curl https://install.meteor.com works. – don.joey Feb 22 '13 at 10:58
  • 1
    I did try wget, but that got me a .html page, which is not what is expected. I did however find the solution the problem in some hidden forum. Tried the command 'sudo sed -i -e 's/us.archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list' which apparently solved it. – Kevin Simper Feb 22 '13 at 11:38
  • Go figure why curl is not installed by default in the first place... – rbaleksandar Aug 15 '15 at 14:08
2

In case that you get error message that curl package is not found you'll have to add repository like this before installing it:

sudo add-apt-repository ppa:ondrej/php
sudo apt update
MilanG
  • 21
  • 1
  • 4
    `curl is available in the standard repositories for all currently supported versions of Ubuntu and unless I'm mistaken is installed by default. If you get the error message you refer to something else is wrong. A PPA should not be required. – Elder Geek Nov 03 '17 at 10:56
  • 4
    curl is not installed by default in Ubuntu 16.04 64-bit at least. Unless it's a special thing in the Vagrant box version. – Juha Untinen Nov 10 '17 at 20:23