New entrants into the Linux world friends, you may have downloaded a good Linux installation ISO, and installed your Linux, then the next, you may want to install some software on the use of Linux. You may start using the software center graphical interface to install, and sometimes also need to install using the command line, or even their own need to compile a binary out - it's amazing how one thing ah.
So today we talk about how to install software packages on Linux.
This article from the GUI Software Center package manager, online repository installation, the local installation source to install one by one to explain matters related to the installation package you need to pay attention.
This article Environment
Ubuntu 15.04 64-bit
Fedora 22 64-bit
It is a wget to download files from the Internet simple free software, below we will use wget to download some files.
Source: We install the program can be obtained from local or remote storage warehouse, the warehouse is the source of our program, it can be referred to as source.
Package Manager: As the name suggests Package Manager is used to manage the package, we can easily be installed from the repository to use this tool, uninstaller. Different distributions have different package manager, Ubuntu use apt-get and use Fedora 22 dnf.
Source: Original code programs, has not been compiled, the program can also be generated by compiling the source code.
Software Center graphical interface
Compile and install from source
Sometimes we find that a package was not included in the depot, there is no binary packages are available, this time we can try to compile and install from source, I'm still here wget, for example, demonstrate how to compile and solve compile problems encountered
The following environment for Ubuntu 15.04
$ Mkdir buildwget # build directory
$ Cd buildwget
$ Wget http://ftp.gnu.org/gnu/wget/wget-1.16.tar.xz # Download Source Package
$ Sudoapt-get remove wget # for later tests, first uninstall wget
$ Xz -d wget-1.16.tar.xz # unzip files xz
$ Tar-xvf wget-1.16.tar # unarchived tar file
$ Ls # List files
ABOUT-NLS ChangeLog.README GNUmakefile maint.mk po util
aclocal.m4 configure INSTALL Makefile.am README
AUTHORS configure.ac lib Makefile.in src
build-aux COPYING m4 msdos testenv
ChangeLog doc MAILING-LIST NEWS tests
The above document is we are going to compile the source file, which has a particular attention is INSTALL, we have to develop a habit, look INSTALL file, which will tell us how to compile, compile-time what needs attention? However, because the compiler here is relatively simple, it does not mention any particular INSTALL important things.
We perform in accordance with INSTALL ./configure
If the following error
configure: error: - with-ssl = gnutls was given, but GNUTLS isnot available.
Error message saying that, given SSL is gnutls but not available (because there is no installation), so we installed and specify openssl as wget of SSL.
$ Sudoapt-get install openssl
$ Sudoapt-get install libssl-dev
$ ./configure --with-Ssl = openssl
If not, it should appear as follows after the implementation
configure: Summary of build options:
Host OS: linux-gnu
Install prefix: / usr / local
CFlags: -g -O2
Libs: -lssl -lcrypto -ldl -lz
Compiler will output a lot of information, do not worry, if there is no error and the last stop, the compilation is successful, the next installation
$ Sudomake install
Try wget command is not yet out? Source installation encountered problems, we should be good at searching, questions and solve the corresponding compiler error adjusted according to the content, the missing dependencies installed, generally succeed.
to sum up
This article explains some methods for novices Ubuntu and Fedora installation package, compared to the previous version, this change from complex simplification and given in tabular form and command parameters, to be skilled and experience of these commands in the end is dry Well, I must also personally knocked, to understand the role of this command. Compiled and installed from source, you show a process of encounter problems, to solve the problem, because the compiler wget is relatively simple, here is particularly intractable problems not encountered, but it clearly shows the process of a compiler installed encounter wrong, we should not be afraid, but to read the error message is given, whereby the search, ask questions and seek answers. Also experiencing problems under Linux must first be good to go their own search, ask questions, get answers and solve problems summarized, or is difficult to learn knowledge.