Quote:
Originally Posted by bulkathos
My box has one disk. It is divided into 4 partionne swap, and other mounted as / /home /data. / is full, because it is ony 4.5G, and I compiled some program from source so the /usr is almost 2.5G. If I #rm -r /usr/local/src/somepro/, does the program I installed still work?
|
The programs will still work. 'make install' copies the compiled files to their proper locations, and deleting the compilation folder won't touch them. But it will make removing the programs more difficult, since you won't be able to run 'make uninstall' in the original folder anymore.
There are a couple of options you can use to work around this. One, you can compile the program in your home directory using the 'fakeroot' program, which lets you simulate a root environment during compilation. Then you can su to root for the final installation.
The second method is to use 'checkinstall'. When you run this small program in place of 'make install', it will wrap your compilation up in a .deb package (on Debian. It can also do .rpm and .tgz), before it installs it. That way you can remove the compilation directory and simply uninstall the package with dpkg or apt.
And of course there's nothing stopping you from using both means together.
Overall, I think the best long-term solution is to create a separate partition for /usr (and maybe /tmp and /var). You'll need to resize your /home partition first to give you some blank space. Then you can mount the new partition, move all the /usr files to it, and finally edit your /etc/fstab file so that it mounts at /usr.
You might have some problems if your current
partitioning scheme consists of four primary partitions though. A hard disk can only have a maximum of four primary partitions. You'll probably have to backup a partition, erase it, and recreate it as an extended partition, so that you can create two or more logical partitions inside of it. It's a bit of trouble, but in the long run it's probably better for your system.
Or, assuming it's not a laptop, you could simply buy a second hard disk and create all the new partitions you need on it.