Install programs in Linux

Source: Internet
Author: User
Linux program installation-general Linux technology-Linux technology and application information. For more information, see the following section. Many new users have misunderstandings about the installation of software in linux. Here is a brief explanation:

Tar.gzw.tar.bz2 is the source code package, which must be compiled before installation. During the compilation process, you can specify various parameters to meet your system requirements, such as the installation location and optimization parameters, which functions are required and not required.

After the source code package is decompressed (tar zxvf is used to decompress tar.gz, and tar jxvf is used to decompress tar.bz2), go to the decompressed directory and generally have an INSTALL text file, which is generally a detailed description of installation, you can use a text editor (such as gedit, gvim, and kedit) Under vi, nano, pico, or X to open and view the file. Generally, three steps are required for installation:

1. configure. This step is generally used to generate Makefile to prepare for the next compilation. You can add parameters after configure to control the installation. For example:

./Configure -- prefix =/usr

The above means to install the software under/usr, And the execution file will be installed in/usr/bin (instead of the default/usr/local/bin ), the resource file will be installed in/usr/share (instead of the default/usr/local/share ). You can specify the -- sys-config = parameter to set some software configuration files. Some software can also be added with -- with, -- enable, -- without, -- disable and other parameters to control the compilation. You can view detailed instructions for help by allowing./configure -- help.

2. make. This step is to compile. Most source code packages are compiled through this step (of course, some software written in perl or python needs to call perl or python for compilation ). If an error occurs during the make process, you need to write down the error code (note that it is not just the last line), and then you can submit the bugreport to the developer (generally there is a submission address in INSTALL ), or your system has less dependent libraries, and you need to carefully study the error code.

3. make insatll. This command is used for installation (of course, some software must first run make check or make test for some tests ), this step usually requires you to have the root permission (because you need to write files to the system ).

After installation, you can delete the extracted directory. Using source code compilation to install software is the most common software installation method in Linux, and this method allows you to control installation details more freely, therefore, we recommend that you use this method to install software.

PS: For a bin-type installation file, you can add executable permissions to the file and run it again, for example:

Chmod u + x example. bin
./Example. bin

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.