0

I am trying to install VM tools in Debian linux which is having trouble finding the gcc binaries. I am trying to install the binaries, as shown in selected answer on this page:

installing vmware tools: location of GCC binary?

However, in these commands:

sudo aptitude install gcc-4.7 make linux-headers-`uname -r` -y
sudo apt-get install build-essential
sudo apt-get install gcc-4.7 linux-headers-`uname -r`

the system is asking me to insert the Official amd64 binary in the CDROM and then press enter. My debian in running on a VM over windows. Not sure where to get this thing and fix this problem. Please advise.

Community
  • 1
  • 1
EternallyCurious
  • 2,345
  • 7
  • 47
  • 78

1 Answers1

0

Debian uses apt to install packages. (apt-get or aptitude are front-ends to the apt systems).

whenever you ask the system to install a given package, it will first need the actual package files. now apt can fetch the requested packages from a number of different places, including read-only media (like CDROMs or DVDs) or the internet (via http or ftp). these "places" can be configured in the /etc/apt/sources.list file.

if you have installed Debian from the set of CDROMs, then your sources.list will tell apt, that it can get package files from the cdrom-drive. obviously you need to have the correct CDROM inserted in your drive. on a virtual machine, you will find that you can use ISO-images of the files and tell your virtualization software (vmware) to make a given ISO available to the client.

however, the usual way is to add an "internet ressource" to sources.list, so you don't need to juggle with CDROM (images) and you will always get any bugfixes. obviously your machine will need to be online for this to work.

add an official online debian repository to your sources. the following uses http://http.debian.net which should automatically use a mirror that is physically close to your machine:

 echo "deb http://http.debian.net/debian $(lsb_release -c | awk '{print $2}') main" | sudo tee -a /etc/apt/sources.list

then update the cache

 sudo aptitude update

and install the required package(s)

 sudo aptitude install build-essential
umläute
  • 28,885
  • 9
  • 68
  • 122
  • Thanks for the answer. I'm able to install build essential but not the linux-headers. It says "Couldn't find any package by regex 'gcc-4.7' – EternallyCurious Feb 27 '14 at 10:37
  • why do you want to install `gcc-4.7`? if you want to compile kernel-modules (why else would you need linux-headers?) it is sufficient to install `linux-headers-$(uname -r)` as this will depend on the *correct* version of `gcc`. – umläute Feb 27 '14 at 10:45
  • Now its asking me for the CDROM again if I try to install linux headers. Interestingly, I tried reinstalling build-essential and its asking for the CDROM again. I checked the sources.list file. and it the source is listed there as "deb http://http.debian.net/debian sqeeze main". Should I manually add/change the source(s). Can you suggest something? – EternallyCurious Feb 27 '14 at 10:57
  • if there is a line in your `sources.list` that references the CDROM, just remove it or comment it out, then run `aptitude update` again – umläute Feb 27 '14 at 11:15
  • Thanks. I installed these successfully. However, my root problem is not really solved because I actually need to enter the gcc location in the vmware-tools installation process. I don't really have the location for the gcc binaries. Can you help me a bit on where to get that? – EternallyCurious Feb 27 '14 at 13:16
  • I have /usr/lib/gcc in my system, which I tried entering in the installation process. But the installer says "/usr/lib/gcc/" is not valid path to gcc binary. Not sure how to install it, but I did "sudo apt-get install gcc" which gcc latest version is already there. – EternallyCurious Feb 27 '14 at 13:39
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/48584/discussion-between-umlaute-and-eternallycurious) – umläute Feb 27 '14 at 13:41