Introduction
In Ubuntu, install the application I know there are three ways, respectively, apt-get,dpkg install Deb and make install Source package three. For each of the following methods, for example.
First, Apt-get method
Installing an application using Apt-get install is one of the most common installation methods, such as I want to install build-essential this software, using the following, he will help me to put all the dependencies are installed together.
sudo apt-get install build-essential
After executing the above command, we can see the information, thefollowing extra packages will is installed: represents all the dependent packages that need to be reinstalled.
sudo apt-get install Build-essential[sudo] Password for enadmin:reading package lists ... Donebuilding Dependency Tree Reading state information ... Donethe following extra packages would be installed:binutils cpp cpp-4.6 dpkg-dev fakeroot g++ g++-4.6 gcc gcc-4.6 libal Gorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-bin libc-dev-bin libc6 Libc6-dev Libdpkg-perl libgomp1 libmpc2 libmpfr4 libquadmath0 libstdc++6-4.6-dev linux-libc-dev manpages-devsuggested packages:b Inutils-doc cpp-doc gcc-4.6-locales debian-keyring g++-multilib g++-4.6-multilib gcc-4.6-doc libstdc++6-4.6-dbg Gcc-multilib autoconf automake1.9 Libtool Flex bison gdb gcc-doc gcc-4.6-multilib libmudflap0-4.6-dev libgcc1-dbg Libgom p1-dbg libquadmath0-dbg libmudflap0-dbg binutils-gold glibc-doc libstdc++6-4.6-docthe following NEW packages would be inst Alled:binutils build-essential cpp cpp-4.6 dpkg-dev fakeroot g++ g++-4.6 gcc gcc-4.6 libalgorithm-diff-perl libalgorith M-diff-xs-perl LIbalgorithm-merge-perl libc-dev-bin libc6-dev libdpkg-perl libgomp1 libmpc2 libmpfr4 libquadmath0 Libstdc++6-4.6-dev Linux-libc-dev manpages-devthe following packages would be Upgraded:libc-bin libc62 upgraded, at newly installed, 0 to re Move and 101 not upgraded. Need to get 36.3 MB of archives. After this operation, 83.6 MB of additional disk space would be used. Want to continue [y/n]? Y
The various parameters of Apt-get are given below:
Apt-get Install XXX. If there are parameters, then-d means download only, -f means mandatory installation
apt-get remove xxx Uninstall XXX  
apt-get update Update software information database
apt-get upgrade & nbsp; system upgrade   
apt-cache search Search packages  
Tips: It is recommended that you use the "apt-get Update" command frequently to update your software information database
Apt-get in theory is required to be able to network, but if the local source is created, there is no need for networking, the production of local sources can be consulted: Ubuntu production local source
Second, dpkg installation Deb package
The Ubuntu package format is Deb and the installation method is as follows:
sudo dpkg- I.
Dpkg's detailed use method, there are many online, below a few simple list:
Dpkg-i Package.deb |
Install package |
Dpkg-r Package |
Delete Package |
Dpkg-p Package |
Delete package (including configuration file) |
Dpkg-l Package |
List the files associated with the package |
Dpkg-l Package |
Displays the version of the package |
Dpkg–unpack Package.deb |
Unpack the contents of the Deb package |
dpkg-s keyword |
Search for the package content that belongs to |
Dpkg-l |
List the packages that are currently installed |
Dpkg-c Package.deb |
List the contents of the Deb package |
Dpkg–configure Package |
Configuration Package |
Third, make install source code installation
If you want to use make installation, then you have to install build-essential this dependency package, the installation method has been mentioned earlier. After the installation is complete, we can install the source code. The source installation can be broadly divided into three steps: (./configure) –> compilation (sudo make) –> installation (sudo make install).
- Configuration : This is the first step in compiling the source code and is done through the
./configure
command. Perform this step to prepare the source code for compilation. Common options are --
prefix=prefix to specify where the program is installed. More options are available through Help --
queries. There are also some programs that do not need to perform this step.
- Compile : Once configured, you can use
make
the instructions to execute the source code compilation process immediately. Depending on the specifics of the software, the time required for compiling is different, and all we have to do is to wait patiently and watch it change. Although this step is only a simple instruction, sometimes the problems encountered are very complex. The more frequently encountered scenario is that the program compiles halfway through but does not end satisfactorily. At this point, you need to analyze the error message to find a strategy.
- Installation : If the compilation is not a problem, then execution
sudo make install
can install the program into the system.
The following example illustrates the installation of Nagios.
1. Unzip the TAR-ZXF nagios-4.0.2.tar.gz //2. Enter the directory CD NAGIOS-4.0.2//3. Configuration./configure--prefix=/usr/local/nagios // 4. Compile make ALL//5. Installing make install && make Install-init && make Install-commandmode && make Install-c Onfig
------------------------------------------------------
Source: http://blog.csdn.net/jx232515/article/details/51892195
Three ways to install programs under Ubuntu (GO)