0

I have a server with no internet access. I am trying to install the build-essential package on the server offline. I read on the internet that some packages should be installed from the CD. using apt-cdrom. But i don't know how it works.

I read that I have to do this

apt-cdrom add

apt-get install build-essential
but it doesn't work. 

Does any one know how to do it ?

  • Can you download it on another computer or phone and transfer it across? I don't think `apt-cdrom` is what you are looking for it still seems to need an internet connection https://help.ubuntu.com/community/AptCdrom – Mark Kirby Jan 06 '16 at 18:05
  • 3
    Possible duplicate of [How can I install software or packages without Internet (offline)?](http://askubuntu.com/questions/974/how-can-i-install-software-or-packages-without-internet-offline) – David Foerster Jan 06 '16 at 18:21

1 Answers1

0

You can download the required files from another system which is connected to Internet. For that you have to create a download script from the server.

apt-get --allow-unauthenticated -y install --print-uris build-essential | cut -d\' -f2 | grep http:// > download-list

This will create a new file named download-list in which the required files for download is included.

Now copy this file download-list to the system where you have Internet facility.

Run the following command to download all files.

wget -c -i ./download-list

Now copy all the downloaded .deb files to the /var/cache/apt/ folder of your server. You will need root permission for this.

After this you can install build-essential simply as we do regularly.

sudo apt-get install build-essential
Joo Nice
  • 144
  • 5