Techniques for installing source software under Linux system

  

A lot of software under Linux needs to be released as a source package. It is very troublesome to install. So what is the simple way to install source software? The following small series will introduce you to the easiest way to install the source software of the Linux system. Let's learn together.

For end users, although relative to the binary package, configure and build up complicated point, but it was much better portability, often for different architectures, software developers Just need to release the same source package, different end users can run correctly after compiling, which is also very consistent with the design philosophy of c language, once written, compiled everywhere, and common binary packages, such as rpm and deb, software development You must customize a special software package for each specific platform. This suffix name can be seen from the rpm file, such as ppc, sparc, i386, etc., do not make too many statements here, in fact, the source installation software Far from being as complicated as many friends think.

Specific steps for installation:

___FCKpd___0nbsp;tar zxvf XXXX.tar.gz (or tar jxvf XXXX.tar.bz2)___FCKpd___0nbsp;cd XXXX___FCKpd___0nbsp;. /configure___FCKpd___0nbsp;make# make install

___FCKpd___1nbsp;make clean

Used to clean up temporary files after installation

# make uninstall

Used to uninstall software

Unpacking:

The two most common source packages are (XXXX.tar.gz or XXXX.tar.bz2). In fact, these source packages are compressed by 2 tools. The tools used at the end of tar.gz are tar and gunzip, and the tools used for tar.bz2 are tar and bzip2. The reason for this is that tar can only package multiple files but no compression. Function, while gz and bz2 are just the opposite, only able to compress a single file, so our common source package is actually packaged by tar first different source files, and then released by gunzip or bzip2 compression, of course, these two The steps can be implemented by one command:

___FCKpd___2nbsp;tar zcvf XXXX.tar.gz XXXX(or tar jcvf XXXX.tar.bz2 XXXX)

The relevant commands for decompression are as follows:

___FCKpd___3nbsp;tar zxvf XXXX.t Ar.gz___FCKpd___3nbsp;tar jxvf XXXX.tar.bz2

. /configure:

The installation is officially started after the decompression is complete (add a point, before starting the configure, if necessary, use the patch tool to patch the source code), first jump to the source directory decompression directory, well known Before starting configure, you should carefully read the README or INSTALL files in the source directory. Many installation considerations are listed here. Configure is actually a script file, type "ldquo;" in the current directory. /configure”, the shell will run the configure script in the current directory. It must be noted that in the entire configure process, the compilation has not yet been performed. Configure is just a preparation for compiling. It mainly does some work for your current work platform. Dependency check, such as whether the compiler is installed, whether the connector exists, if there is no error in the detection process, you are fortunate that the configure script will generate another file Makefile in the current directory to use the next link to compile, of course. Configure support and its rich command line arguments can be typed into “. /configre --help”Get the specific information, the most commonly used is probably:

___FCKpd___5nbsp;. /configure --prefix=/opt/XXX

It is used to set the installation directory of the software.
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved