Specify the installation directory when compiling software under Linux

Source: Internet
Author: User
1, the source code installation steps

The installation of the source code generally consists of 3 steps:
1). Configuration (Configure)
2). Compile (make)
3). Install (make install)

2,./configure–prefix=/usr/local/test

Configure is an executable script that has many options for using commands under the source path to be installed./configure–help output A detailed list of options.
Where the –prefix option is the path of the configuration installation, 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 you configure –prefix, such as:
./configure–prefix=/usr/local/test
All resource files can be placed in the/usr/local/test path without clutter.

3. Prefix options Other benefits

Another benefit of using the-PREFIX option is 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; 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 specified uninstall.


This article from the "Alpine" blog, reproduced please contact the author!

Specify the installation directory when compiling software under Linux

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.