Normal compilation installation/uninstallation: The installation of the source code is generally composed of 3 steps: Configuration (Configure), compile (make), install (makes install). The Configure file is an executable script file that has many options for using commands in the source directory to be installed./configure–help can output a detailed list of options. Where the--prefix option is to configure the installation directory, if this option is not configured, after the installation executable file is placed by default in/usr/local/bin, the library file is placed by default in/usr/local/lib, the configuration file is placed by default in/usr/local/etc, and other resource files are placed in /usr/local/share, more messy. If--prefix is configured, such as: $./configure--prefix=/usr/local/test all resource files after installation are placed in the/usr/local/test directory and are not dispersed to other directories. Another benefit of using the--prefix option is the convenience of uninstalling the software or porting the software; When an installed software is no longer needed, simply remove the installation directory, you can uninstall the software cleanly, and the porting software only need to copy the entire directory to another machine (the same operating system). Of course, to uninstall the program, can also be used in the original make directory once made uninstall, but only if the makefile file has uninstall command (Nodejs source package has uninstall command, test version v0.10.35). About Uninstall: If the--prefix option is not configured and the source package does not provide make uninstall, you can uninstall it in the following ways: Find a temporary directory to reinstall, such as:
$./configure--prefix=/tmp/to_remove && make install and then traverse the/tmp/to_remove file to delete the file that corresponds to the installation location (because/tmp/to_ The directory structure in remove is the directory structure when the--prefix option is not configured).
Linux./configure && make && make install compile installation and uninstall