8

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?

muru
  • 193,181
  • 53
  • 473
  • 722
mayur Mehta
  • 89
  • 2
  • 3
  • 10
  • 1
    How are you exactly installing `build-essential`? It seems that you've downloaded a `.deb` file. Don't do that. You're not on Windows - in Ubuntu we use repositories. Try `sudo apt-get install build-essential` in a terminal and report the results or exact error output in your question by editing it. – gertvdijk Aug 18 '13 at 14:31
  • sir i don't have internetconnection in ubuntu thats why i hv downloaded from windows so what to do now? sir when I am using command line then they are giving error of unable to locate package build-essential – mayur Mehta Aug 18 '13 at 14:34
  • 2
    I suggest to fix your internet connection first. That will make your life a lot easier. – gertvdijk Aug 18 '13 at 15:22
  • 2
    @gertvdijk I bet that's exactly what he's trying to achieve. If your NIC isn't supported by the kernel you've to build modules from e.g. Compat-wireless – Germar Aug 18 '13 at 15:41
  • 1
    I should note that `build-essential` is a **metapackage**. That is to say, it refers to other packages, as `build-essential` incorporates a lot of basic libraries for building and a lot of executables, so they don't bundle it up in one package, it refers to many other packages. – Thomas Ward Aug 18 '13 at 15:55

1 Answers1

14

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)
Germar
  • 6,217
  • 2
  • 24
  • 39
  • 1
    Alternatively, you can install – tuomastik Nov 27 '19 at 18:22
  • 6
    `Unable to locate package build-essential` - if you have no network, it won't have run `apt update`, so it does not know of packages. Your only option is to install Ubuntu somewhere with internet (inside a VM) and then follow the above steps and plus you will need to move the `/var/lib/apt/lists` to the offline machine – Zoltan Fedor May 15 '21 at 01:10
  • 1
    I had to use `wget -i urls.txt` (see also [how-to-wget-a-list-of-urls-in-a-text-file](https://stackoverflow.com/questions/40986340/how-to-wget-a-list-of-urls-in-a-text-file) – marcel h Apr 19 '22 at 17:29
  • Good answer. The last command is not working for me. It is still searching for the url online – makkasi Apr 23 '23 at 15:46