Linux source code package installation and script installation, linux source code package script

Source: Internet
Author: User

Linux source code package installation and script installation, linux source code package script

YesVi INSTALLCheck the installation process.

1. Install the source code package

2. Script Installation



What are the basic steps for installing the source code package in linux?

Detailed description of the installation process of the linux source code package

1. decompress the package

A software package can be obtained by downloading or other means. Generally, it is a compressed file, most of which may be archived and compressed. These files generally use. tar. gz as the extension.

First copy it to a directory, and then untar and gunzip unzip it. Usually this command is

Tar xzvf filename [filename is the name of the software file]

The decompressed file is generally named after the package name in the subdirectory that is created in the current directory. You can also use this command to view the result tar tzvf filename in advance and display the unzipped files in the package.

If the source file is in the new bzip2 (.bz2) format

Bzip2-cd filename | tar xvf-, or a simpler tar xyvf filename, which is a good tar command that is constantly improved.

Note:

A: Sometimes some files must be installed in the user's home directory, or more in A fixed directory, such as/,/usr/src, or/opt. Therefore, you must carefully read the configuration information of the installation package. If the config and Makefiles files exist in a software package, you are advised to edit them. The installation instructions and instructions are provided here. Tip: Changing makefile will lead to different results. Most software packages allow the use of make install to automatically process placement of binary files in the appropriate system location.

B: You may have encountered some shared files, shell archive files, especially source code newsgroups on the Internet. They are retained because they are user-friendly and allow newsgroups to buffer and filter and remove Unqualified ones through them. They may be decompressed using the unshar filename. shar command.

C: some source code archive files use non-standard DOS, Mac, or other compressed files such:

Zip, arc, lha, arj, zoo, rar, and shk.

D: Sometimes, you may need to use a patch or display the changed diff file to upgrade or fix the archived source code file. This doc file or README file will tell you how to use it. A good command to call with standard syntax is patch <patchfile.

2: rpm installation package

Some Linux users are afraid to manually install the software package by using the source code, but now there is a convenient rpm, deb, or new grid-type slp package. For example, the rpm installation runs smoothly and fast, and is installed on several famous operating systems as a software.

As a convenient RPM package, there are also many disadvantages, such:

A: To learn more about the software, you must understand it in binary instead of rpm packages.

B: install an rpm package. If dependency is required, the installation may fail.

C: When rpm requests libraries of different versions in your system, the installation will not continue unless you create a connection symbol for the wrong library location to the correct location.

Note: You must use root to install rpm and deb. Because it requires the required write permission.

The simplest way is to run the command rpm-I packagename. rpm and dpkg -- install packagename. deb to automatically unpackage and install packagename. deb.

3: Some Problems and Solutions for installing the Linux package

Suppose there is a link error in make failure:-lX11: No such file or directory, which is called exactly after xmkmf, which may mean that Imake cannot be completely created. Check the line of the first Makefile file as follows:

· LIB =-L/usr & #4 ...... remaining full text>

How to install the source code package in linux?

Install the source code package in linux. First decompress the package (generally .tar.gz, go to the Internet to find out what dependency packages are required for the downloaded source code package. First, install the dependency package before installing it. The prerequisite for installation is that you must set the parameters according to make, gcc, and other tools and environment variables. Because the source code needs to be compiled.

General steps for installing source code:
Go to the directory after source code extraction
1. Configuration
./Configure (you can follow the options. The default option is not added)
2. Compile
Make
3. Installation
Make install
4. Some operations such as ln linking or environment variables may be involved. For details, refer to the software.

The above is a general step, the most useful is to look at the description file in the software package.

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.