Friday, July 20, 2007

I can't run "make" in Ubuntu

I have tried to install a couple things that kept asking me to "./configure" and then"make install". I kept getting a "unknown command" when I tried to run it. Well after a bit of searching I found out that this was because there was no C/C++ Compiler installed. Websites spoke of all types of freaky weird ways to make it work when I came upon a post about "Synaptic Package Manager" which was a life saver.

Basically Synaptic is a graphical version of apt-get which if you have run will. Apt-get is a command line way to download and install programs in Linux from the command line (Red Hat also uses "yum"). Well the catch is that if any part of the program name has changed --say oh the version number, you may not be able to find the app.

Because Synaptic is visual you do do a simple search to visually pick what you need. (Note: If your flavor of Linux does not have synaptic you should be able to use the command apt-get update && apt-get install synaptic)

I said all that to say this. To install that elusive compiler program you can open Synaptic by

  1. Going to System > Administration > Synaptic Package Manger.
  2. Click on "Reload" to update the available packages.
  3. Click on the "Search" button.
  4. Type in "gcc" and press enter. (Note: gcc is a command line C/C++ compiler)
  5. Select all instances of "gcc" that appear
  6. Click "Apply" and the packages will be installed for you.
  7. Close Synaptic
  8. Run your "make install" command from the terminal window.
In my case I also had to add a library in which case you can go back into Synaptic and simply search or what ever library name it needs.

Special Note: Remember in Ubuntu you must add "sudo" to the front of "make" in the terminal window so the OS will not complain about permission issues.

No comments: