Linux./configure-Prefix command

Source: Internet
Author: User
Linux./configure -- prefix command

Http://blog.csdn.net/xiyangfan/archive/2010/02/24/5321790.aspx

Http://blog.dormforce.net/rox/2008/09/26/configure-prefixxxx%E7%9A%84%E4%BD%9C%E7%94%A8/

The installation of source code is generally composed of three steps: configuration (configure), make, and make install. The specific installation method is generally provided by the author, configuration is discussed here ). Configure is an executable script with many options. Use the command./configure-help to output a detailed list of options, as shown below:
-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]
.......... (Omitted)
Many options, I personally think, you can ignore everything else, but please add-prefix. Here to install the supersparrow-0.0.0 as an example, we intend to install it to the directory/usr/local/supersparrow, So execute the script with the option in the supersparrow-0.0.0 directory. /configure -- prefix =/usr/local/supersparrow. After the execution is successful, compile and install (make, make install). After the installation is complete, the directory supersparrow is automatically generated, all files of the software are copied to this directory. Why do I need to specify the installation directory? It is for future maintenance convenience. If this option is not used, after the installation process ends, the software required for the software will be copied to different system directories, it's hard to figure out where all the files have been copied-it's basically a mess.

Another benefit of using the-prefix option is to uninstall or port the software. When a software installation is no longer needed, you only need to delete the installation directory to clean the software; to transplant software, you only need to copy the entire directory to another machine (the same operating system ).

A small option has such a convenient effect. We recommend that you use it more in actual work.

--- If no prefix is specified, the executable files are stored in/usr/local/bin by default, the library files are stored in/usr/local/lib by default, and the configuration files are stored in/usr/local/etc by default. Put other resource files in/usr/local/share. To uninstall this program, you must either use make Uninstall in the original make directory (provided that the make file has been specified as uninstall) or manually delete the relevant files in the preceding directory. If you specify a prefix, simply delete a folder.

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.