4

I just want to install vestacp on my Ubuntu 16.04 using curl, so it needs me to install curl by

apt-get install curl

but it gives me this error:

root@cindyadonia:/# apt-get install 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

E: Package 'curl' has no installation candidate

I've follows this thread but it still doesn't work. The program 'curl' is currently not installed

What did i miss? Please let me know.

Here is my sources.list. I did add some # which I don't really understand. Please correct me.

# deb cdrom:[Ubuntu-Server 16.04.4 LTS _Xenial Xerus_ - Release amd64 (20180228)]/ xenial main r$

# deb cdrom:[Ubuntu-Server 16.04.4 LTS _Xenial Xerus_ - Release amd64 (20180228)]/ xenial main r$

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
# deb http://archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
# deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
# deb http://archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://archive.ubuntu.com/ubuntu/ xenial universe
# deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb http://archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial multiverse
# deb http://archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

# deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
# deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse


# deb http://archive.ubuntu.com/ubuntu xenial main universe multiverse restricted
# deb http://archive.ubuntu.com/ubuntu trusty universe
Byte Commander
  • 107,489
Adonia
  • 43
  • Can you run sudo apt update ; sudo apt policy curl and [edit] your question to add the output? – Byte Commander Apr 21 '18 at 13:22
  • hello! i can do sudo apt update. and for the sudo apt policy curl. it shows me none installed, none candidate. a blank version table – Adonia Apr 21 '18 at 13:55
  • And the output of sudo apt update? curl is in the official Xenial repositories, so if you're correctly updating these, it should have a candidate available. – Byte Commander Apr 21 '18 at 14:24
  • the output is 'Reading package list... done'. Anyway should i show my apt sources.list? i also did some edit with some sources to put # on every single line. because if i dont put # it doesnt let me to update. i see it on threads. – Adonia Apr 21 '18 at 14:28
  • Well, yes, if you commented all sources.list lines, you have no available packages of anything at all. That is really bad. You should undo your changes to the sources.list files and run sudo apt update again. If there are errors, we have to fix those in the next step. – Byte Commander Apr 21 '18 at 14:30
  • i see wait let me post my current sources – Adonia Apr 21 '18 at 14:32
  • 1
    "I did add some # which I don't really understand." "#" turns the line into a comment, so it's not processed (in this application). Making changes you don't understand is a sure path to disasters. – waltinator Apr 21 '18 at 14:55
  • omg did i read it wrong.. i see it on threads. but i dont remember. so which one should i remove now? – Adonia Apr 21 '18 at 15:03

1 Answers1

1

Please replace your sources.list file with this. I uncommented all recommended repositories (main/restricted/universe/multiverse from xenial, xenial-updates and xenial-security; no backports, no partner, and no sources) and removed a few unnecessary lines:

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://archive.ubuntu.com/ubuntu/ xenial universe
deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

After that, download the package lists using:

sudo apt update

Now, as you had package updates disabled for a while, let's get your system up to date first:

sudo apt upgrade

After that, install curl as you originally intended to do:

sudo apt install curl
Byte Commander
  • 107,489
  • Hello! still cant install the curl. i think i've met some problems on the update. – Adonia Apr 21 '18 at 15:12
  • root@cindyadonia:/# sudo apt update Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease Temporary failure resolving 'archive.ubuntu.com' Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease Temporary failure resolving 'security.ubuntu.com' Err:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease Temporary failure resolving 'archive.ubuntu.com' Reading package lists... Done
    Building dependency tree
    Reading state information... Done All packages are up to date.
    – Adonia Apr 21 '18 at 15:13
  • W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Temporary failure resolving 'security.ubuntu.com' W: Some index files failed to download. They have been ignored, or old ones used instead. – Adonia Apr 21 '18 at 15:13
  • Please edit your question to add new information, especially command outputs, instead of posting them in comments. Anyway, "Temporary failure resolving ..." is a networking problem. Can you browse the internet with that specific computer? Can it open http://archive.ubuntu.com/ in a browser? Anyway, I think you should open a new, follow-up question for this issue, where you post the output of sudo apt update again and answer these questions above. – Byte Commander Apr 21 '18 at 15:47