What does the Linux ./configure --prefix command mean?

        The installation of source code generally consists of three steps: configuration (configure), compilation (make), and installation (makeinstall) .

Configure is an executable script with many options. Use the command ./configure–help to output a detailed list of options under the source code path to be installed.

        The --prefix option is the path to configure the installation . If this option is not configured, the executable file is placed in /usr/local/bin by default after installation, the library file is placed in /usr/local/lib by default, and the configuration file is placed in /usr/local/lib by default. usr/local/etc , and other resource files are placed in /usr/local/share, which is rather messy.

If you configure --prefix, such as:

 ./configure --prefix=/usr/local/openssl

 All resource files can be placed in the path of /usr/local/test without clutter.

Another benefit of using the --prefix option is uninstalling or porting software. When a certain installed software is no longer needed, simply delete the installation directory, and the software can be completely uninstalled; transplanting software only needs to copy the entire directory to another machine (same operating system).

        Of course, to uninstall the program, you can also use make uninstall once in the original make directory, but the premise is that the make file has specified uninstall

-------------------------------------------------- -------No text below---------------------------------------- --------------

Note: For study only, record questions and reference, encourage each other!

Reference reprinted article:

1. What does the Linux ./configure --prefix command mean? _Yang Gangle Huahuo's Blog-CSDN Blog

Guess you like

Origin blog.csdn.net/qq_39715000/article/details/125022415