Ubuntu – How to install build-essential without an Internet connection?

package-managementsoftware installation

I can't install it. Qhen I am installing build-essential_11.4build1_amd64.deb getting error of wrong architecture still I am using amd turion 64 and then i am trying to install build-essential_11.4build1_i386.deb getting error of Dependency is not satisfiable:g++(>=4:4.3.1)

I don't have an internet connection in ubuntu that's why I have downloaded from windows so what to do now?

Best Answer

Open a Terminal by pressing CTRL+ALT+T and type:

sudo apt-get -qq --print-uris install build-essential linux-headers-$(uname -r) | cut -d\' -f 2 > urls.txt

copy the urls.txt to a thumbdrive and move over to a computer with Internet Access. Download all files from urls.txt (if the other computer is running Linux you can use wget < urls.txt) and save them in a folder called deb on your thumbdrive.

Go back to your Ubuntu machine, plug in the thumbdrive and open a Terminal

sudo cp /media/YOUR_USERNAME/THUMBDRIVE_NAME/deb/* /var/cache/apt/archives/
sudo apt-get install build-essential linux-headers-$(uname -r)