Learning notes: Linux./configure && make && make install compile and complete uninstall

Source: Internet
Author: User

Normal compilation installation/uninstallation:The installation of the source code generally consists of 3 steps: configuration (configure), compile (make), install ( make 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/testAll 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 software or porting software;when an installed software is no longer needed, simply delete the installation directory, you can uninstall the software cleanly;The porting software simply copies the entire directory to another machine (the same operating system). Of course, to uninstall the program, you can also use the original make directory once made uninstall, but only if the make file has been specified uninstall. about uninstalling:If the--prefix option is not configured and the source package does not provide a make uninstall, you can uninstall it in the following ways: Find a temporary directory to reinstall, such as:
$./configure--prefix=/tmp/to_remove && make installThen traverse the/tmp/to_remove file and delete the file that corresponds to the installation location (because the directory structure in/tmp/to_remove is not the directory structure when the--PREFIX option is configured). Original address: http://www.cnblogs.com/zhangbo127/p/4556008.html reference address: http://www.zhihu.com/question/20092756

Learning notes: Linux./configure && make && make install compile and complete uninstall

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.