./configure && Make && make install detailed

Source: Internet
Author: User
  Install software in Linux The most important thing is to carefully read the installation package of the Readme  install two documentation, these two files will clearly tell you how to properly complete the installation of the software.           we all know that the source package installation is divided into such a few stages, 1,   /configure: "Configure" Test the existing features    make: Compile the program on your system. 5, &NBSP;CD: Access to this source package.   Now LS MRTG This directory has a blue font httpd-2.2.11 This directory, which we just unpacked, and then the CD into the directory below. If you do not enter into this directory but direct./configure the following illustration appears. 3, bug!) Then create the makefile file to complete make. The "Configure" script has a number of command-line options, and these options may change for different packages, but many of the basic options will not change. And the most we use is the following command:./configure--prefix=/The path to be installed by the software but we can also direct./configure without specifying a path, the software default path that is usually compiled from the source package is/usr/local/, if. /configure is not successful and directly to make, there will be the following image error: When we finish./configure error, and then again./configure successful, we can compile the program. Say a few things about whether you can compile a successful file:/etc/ld.so.conf, Ldconfig first of all,/etc/ld.so.conf, the path of the dynamic-link library that is recorded in this file at compile time, by default the compiler will only use/lib and/usr/ Lib these two directories under the library file, if you installed other libraries, then the installation is completed in/etc/ld.so.conf the library file in the absolute path to write in the OK. Let's see what Ldconfig is: He's a program, and its role is to cache paths in/etc/ld.so.conf to/etc/ Ld.so.cache, so after installing some library files or modifying ld.so.conf to add a new path, you need to run/sbin/ldconfig to make all the library filesBoth caches are Ld.so.cache, if not run/sbin/ldconfig, even if the library file is in the/etc/ld.so.conf, it will not be used, the results in the process of compiling the same error missing XXX library. 4, make: Compile the program. At compile time, there is a difference between GCC versions, so sometimes with different versions of GCC to compile, some version can be compiled successfully, and some failed to compile, such errors are only version problems. In addition to make when there will be another error is more difficult, encounter such problems can only rely on experience to find reasons, such as a header file did not find, this time to follow the location of the error line to look up, such as the display xxxxxx.h.........no such file or Directory, note missing header files, or find the wrong information you feel valuable to search engines, from here may find useful information to you, the most important thing is to carefully look at the README, install files before installation, these two files will tell you how the program should be installed , what dependent files you need, and so on. Sometimes at compile time does not know whether compiles succeeds, but does not have the compilation success to Make  install certainly will be wrong, thus increased the question complexity, as the saying goes that good "while outsmart", thus we may in Make ends with a single command to check for successful compilation: Echo  $? Enter this command return, the output of the result is 0, then the success of compiling, otherwise it is a mistake, echo  $? indicates that the exit status of the previous command is checked and the program exits normally and returns 0. 5, <span times= "new=" "Roman '" = "style=" padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; >   make install: installation files. It also reads the instruction from the makefile and installs it to the specified location. See the above figure output 0 we can make  install to install, after running the input echo  $? Check to see if there are any errors, as long as the output is 0, that means our AnnLoaded successfully, we can test, put Apache service up/usr/local/apache2/bin/apachectl start, because Apache port is 80 so we Netstat-lan | grep 80来 Look at the 80 port in the listening state does not: and then IE enter the server's IP address http://10.10.234.203/success, indicating that our installation is no problem! In fact./configure, make, make  install these three commands, we can use && to connect the command to execute, indicating that the current command after the normal end, the following command will be executed, this method is good, save time , and you can prevent errors from occurring. Example:./configure  &&  make  &&  make  install
Turn to: http://wangqiyong.blog.51cto.com/500227/367049

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.