A new OS experience


Building from Source

My old desktop has an unsupported wireless pci card, and after some searching I found a windows driver that I can use via ndiswrapper. But Kubuntu 7.10 doesn't install ndiswrapper so I have to install from source. Hm, I never had to do that before, and after searching google I came across www.justlinux.com, an excellent site for newbies to Linux. They have some pretty good primers, as in the case of my current interest compiling software. The reason I have to do this is that my desktop is located in a room where I can't run CAT-5 cable easily, so wireless networking is the only answer. But the example they give at justlinux.com follows:

A Real Life Example

Now for a real life example. I downloaded a tarball called bar.tar.gz and saved it in /tmp.

Okay, so the tarball name is not real. But the procedure is. First I decide I want to install the files in /usr/local/programs/bar. So obviously, I will have to create the appropriate directories. Now I should mention that you do not need to be root to configure and build the software. However, you must be root when you are installing the software.

cd /tmp
tar xvzf bar.tar.gz
cd bar
./configure --prefix=/usr/local/programs/bar
make install

Now that my software is installed, I then edit my /etc/profile and append the following:

export PATH

Finally, I source my /etc/profile file and then I am ready to use my program. When I want to uninstall it, I can just run make uninstall, and if that does not work, I can just delete the subdirectory bar under /usr/local/programs.

No comments: