When Linux installs software. The benefits of/configure--prefix=/usr/local/python35

Source: Internet
Author: User

Linux under the installation of the source code generally consists of 3 steps: Configuration (Configure), compilation (make), installation (make install), the specific installation method of the general author will give the document, here is the main discussion configuration (configure). Configure is an executable script that has many options, 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 does 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 number of)
A lot of options, personally think, you can ignore everything else, but please add-prefix. For example, to install PYTHON35, we intend to install it to the directory/usr/local/python35, and then execute the script with options in the Python35 directory./configure--prefix=/usr/local/ Python35 execution succeeds and then compiles, installs (Make,make install), and the installation completes automatically generates the directory Python35 and all files of the software are copied to this directory. Why do you want to specify this installation directory? is for later maintenance convenience, if this option is not used, after the installation process is over, the software required by the software is copied to a different system directory, it is difficult to find out exactly where the files copied, copied to where-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 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).

A small option has such a convenient role, suggested in the actual work of a lot of use




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.