Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Convention is to put source in /usr/local/src. The reason being that if you were to (re)install a distribution, they're not supposed to do ANYTHING to the /usr/local directory tree. But no, there's nothing preventing you from putting the source anywhere you want.
I do things a little different than most. I keep the compressed source code in a separate directory (usually /usr/local/src/tarballs). Then I delete the source tree after the make install. I save some disk space, and it guarantees I get a "clean" install everytime I want to recompile.
It's only slightly more complicated if you have patches or make custom edits to the source.
Re: a dilema after configure, make, make install...
Quote:
Originally posted by alixx first question...
is there a rule on where i should extract source (tar.gz) files???
A rule of thumb maybe, but no *rule* per se. /usr/src should be fine, but you can use /home/tarballs or /usr/local/files if you want (or somewhere else)
Quote:
should i always extract it in /usr/src ???
Not necessarily, see above
Quote:
after extracting the files and performing the configure, make, make install procedure, do i have to make clean???
Not necessarily, if you remove the files then there is no point. A make clean basically un-does what make does. So only if you are going to re-configure do you have to. But a make clean always helps free up some space if you are wayyy low, but see below for more info on that...
Quote:
or can i completely delete the directory that holds the extracted source??
please forgive my desperately novice/newbie question?
thanks...
ali
You can remove the directories that are created during the untarring of the tarball, yes. If space is an issue, this is a great idea. However, be aware that if you want to use something like 'make uninstall' (should it be a feature of that application, not all applications have this feature) then you'll need to make sure you configure/make exactly like you did before to use the make uninstall. But if you don't use make-uninstall, then there is no reason to keep it around (unless you are doing multiple installs on the same system? probably not though).
I downloaded a tar (Kopete Desklist) to /home/bill/downloads/ I then extracted it to the folder: /home/bill/downloads/32089-desklist-0.3.0 I have installed the plugin. Now I want to delete the folder: /home/bill/downloads/32089-desklist-0.3.0. It is now safe to delete the 32089-desklist-0.3.0 folder as any/all files necessary to run the Kopete Desklist plugin have been installed and/or copied to other folders?? Correct??
On my old Windows machine, I was able to keep WIN98 running without reinstalling because I kept track of everything I put on my machine. Anything I didn't need I made damn sure all traces were gone (except for a few registry headings) when uninstalling. The only time I ever reinstalled Windows was when my HDD died.
I wish to do the same with Linux, but no-one ever mentions where the best place for source code is, or even where to put unzipped files. It seems expected that Linux newbies should only use the software that came with their distro, and not install anything else. This just leads to newbies having cluttered filesystems which causes the same need for an annual reinstallation on Linux that you have for Windows.
Even in the "Linux for Dummies" series, there is no real mention of housekeeping when installing new software, let alone uninstalling anything. They expect you to have RPMs for every little thing you need.
Sorry for the rant. I just appreciate that this thread has useful information rather than the regular "just type configure make install and everything should work" which passes for the standard advice on this topic.
There is no registry for coders to hide things in on our OS. If you run make uninstall as root, the program will be gone. It's config files can still exist, but as there are no files looking to these configs, so other than the 2 or 3 kb of space they use, there is nothing that needs to happen.
You don't ever need to wipe *nix and reinstall, unless the problem was created between the keyboard and the chair (aka you!). Any distro can run fine with or without compiling from source. Disk space is so cheap now, you don't need to worry about your 2 Mb tar.gz files eating up space on your 250 Gb drive.
If I understand you correctly you have to do a "make clean" (please explain) and "make uninstall" will uninstall the installed files? So 1. do you "make uninstall" from the same folder you did "make install" 2. should you save the extracted folder incase you want to uninstall or can you recompile source in order to "make uninstall"
Make uninstall would have to be run in the same directory as make install. So if your app is named program, and it is unzipped in /usr/local/program, then you would cd there and as root make uninstall.
I guess you could recompile the thing to uninstall it, but that is foolish, and if you change something unknowingly with two different compiles, the uninstall may fail. Space is so cheap, you NEVER should erase the location where you compile. Just leave it there. Then if you decide to erase it later, it is just make uninstall. Game over.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.