The role of option-prefix during Linux source installation

Source: Internet
Author: User

The installation of the source code is generally composed of 3 steps: Configuration (Configure), compile (make), installation (make install), the specific installation method is generally the author will give the document, here is the main discussion configuration (configure). Configure is an executable script that has many options for using commands./configure–help output A detailed list of options, as follows:

-bash-3.00#./configure--help
usage:configure [Options] [host]
Options: [Defaults in brackets after descriptions]
Configuration:
--cache-file=file cache test results in file
--HELP Print this message
--no-create do not create output files
--quiet,--silent do not print ' checking ... ' messages
--version Print the version of autoconf that created configure
Directory and file names:
--prefix=prefix install architecture-independent files in prefix
[/usr/local]
--exec-prefix=eprefix install architecture-dependent files in Eprefix
[Same as prefix]
--bindir=dir user executables in DIR [Eprefix/bin]
.... (Omit a few)

A lot of options, personally think, you can ignore everything else, but please add-prefix. To install supersparrow-0.0.0 as an example, we intend to install it to directory/usr/local/supersparrow, and then execute the script with options in the supersparrow-0.0.0 directory./configure–prefix =/usr/local/supersparrow, the execution succeeds, then compiles, installs (Make,make installs), the installation completes automatically generates the directory Supersparrow, and all the files of the software are copied to this directory. Why do you want to specify this installation directory? is for the future maintenance convenience, if not with this option, after the installation process, the software required to be copied to a different system directory, it is difficult to find out exactly where those files copied, where to copy to-basically a mess.

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).

A small option has such a convenient role, it is recommended to use more in the actual work.

The role of option-prefix during Linux source installation

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.