0

I installed Ubuntu 18.04.1 LTS in my VirtualBox. I want to use gcc in it but it doesn't have a pre-installed version, and when I try to install it shows the following message:

sudo apt-get install gcc
package gcc 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
2
  • 2
    Do you have a working internet connection in your ubuntu system?
    – muclux
    Aug 15, 2018 at 6:37
  • 3
    Have you tried sudo apt update before attempting to install gcc? Aug 15, 2018 at 6:37

1 Answer 1

0

Before attempting to install gcc or any other program on a new installation, you should update the packages list first:

sudo apt update

Then install the programs you desire the usual way. (sudo apt install <package-name>)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .