How to compile and install the package management software source package

Author: North-South-North
from: League of Legends Community
Summary: Source software installation package, unloading, give the novice a little help and tips; herein also the type of installation package also made a little explanation;


++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++
text:
++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++


First, what is the source package software;

the name implies, the source package the source code for the package is visible, the most common software-based Linux and BSD systems; visible source software in the country is almost extinct; most open source software is produced abroad; in the country more well-known open source software fcitx; lumaqq; Lumaqq and scim so on;

But the software's source code is visible does not mean that the software is open source, we have to license software shall prevail; for example, some software source code is visible, the user can only be agreed but he agreed to modify the content of his; for example vbb Forum program ; so if a software is open source software, have to have two conditions; first, the source code is visible; second is to have the liberal license, like GPL certificate;

In GNU Linux or BSD community, developers and release a binary package software, will provide the source code package for us;

Second, the source code is what is the use?

If there is a software source code, anyone can see how he came to develop, like a bottle, such as what the bottle is made of die; what material; a detailed description of the specific uses and bottles, and so on. Open source software is similar to our software developers at the same time, will tell us how software is developed; as long as our levels high enough, all of the code in there, we can modify and customize the software, to suit our needs; if Windows open source and released under the GPL, as someone able to make out more than N Windows releases; Unfortunately, Windows is not open source systems;


So the usefulness of the source code of software is nothing more than two things;

1, the software to be customized according to user needs;
2, secondary development; Note: According to the agreement subject to license software developers to license the secondary development of the job;


Third, how to install the software, packaged source;


1, source package packaging format;

Source generally file.tar.gz file.tar.bz2 or file.src.rpm packing; file.tar.gz unpack command and file.tar.bz2 format are as follows;

[root@localhost beinan]# tar jxvf file.tar.bz2
[root@localhost beinan]# tar zxvf file.tar.gz

As for usage file.src.rpm, see: "Introduction file.src.rpm method of using"

2, how to compile and install source packages; (most)


1) to unlock the software packages help documentation;

we unlock a package after entering unzip the package, can usually be found README (or reame) and iNSTALL (or install); or doc (or DOC) directory; see the name to know more about the same;

For example, we download a newer package fcitx, such is fcitx-3.2-050827.tar.bz2

We solved this package will find the following documents;

[root@localhost fcitx]# tar jxvf fcitx-3.2-050827.tar.bz2
[root@localhost fcitx]#cd fcitx
[root@localhost fcitx]# ls
aclocal.m4  config.guess  configure     debian         INSTALL      Makefile.in    src     xpm
AUTHORS     config.h.in   configure.in  depcomp        install-sh   missing        THANKS
autogen.sh  config.rpath  COPYING       doc            lib          mkinstalldirs  TODO
ChangeLog   config.sub    data          fcitx.spec.in  Makefile.am  README         tools

So we can see INSTALL fcitx installation documentation and the doc directory; which tell us how to install;

Sometimes installation documentation will have detailed instructions and deal with common problems like on the developer's home page; for example LumaQQ


2) conditional compilation to install software;

first of all we at least have to put in the Linux system development tools installed, such as gcc; perl; python; glibc; gtk; make; automake and other development tools or the basic package; also install some corresponding development package, usually including dev file name, such as kernel-devel; there are a number of development libraries, such as at the beginning of lib; if you compile software, sometimes suggesting a lack of something like the large number of these development tools and the development of libraries; it wants to install from the CD-ROM to find; sometimes the CD does not provide, please search for the appropriate packages with google, may sometimes be used to compile source packages installed depends package;

Sometimes the original system has been installed package depends, but the system is not able to find how should I do? Then we need to set about PKG_CONFIG_PATH environment variable on the line;

#export PKG_CONFIG_PATH = / usr / lib / pkgconfig
or
#export PKG_CONFIG_PATH = / usr / local / lib / pkgconfig
then let us run the compiled ./configure; make; make install, try to come;

To program in java tool developed to use jre or jdk; jdk has been included jre, so if we just require an environment java program running, only need to install jre on the line; installed jre, configure the look of java environment variables can be used. If it is a graphical interface program, little mouse on OK;

Please refer to: "the JRE installed and configured to suit JAVA program run with the environment."

Perl development program, perl environment is required, it is necessary to have installed on the package of perl, Python also empathy;


3) The method of installing software compiler;

Mostly tar.gz and tar.bz2 software packages, mostly through ./configure; make; make install to install; some software directly make; make install;

We can see by ./configure --help functional configuration software; most of the software is to provide the functionality of the software configuration ./configure; a few did not, and if not would not have ./configure; directly make; make install on the line ;

./configure more important argument is --prefix, with the --prefix parameter, we can specify the software installation directory; when we do not need the software, directory software directly delete the line;

For example, we can specify fcitx installed to / opt / fcitx directory;

[root@localhost fcitx]#./configure --prefix=/opt/fcitx

If we do not need fcitx, you can delete / opt / fcitx directory;

So we give this example, fcitx if the custom installation to / opt / fcitx directory, complete installation should be:

[root@localhost fcitx]# tar jxvf fcitx-3.2-050827.tar.bz2
[root@localhost fcitx]#cd fcitx
[root@localhost fcitx]# ./configure --prefix=/opt/fcitx
[root@localhost fcitx]# make
[root@localhost fcitx]# make install

Call fcitx, should be

[beinan@localhost ~]#/opt/fcitx/bin/fcitx

If you want to make fcitx whenever the fcitx, you can call, configure the environment variables, or do a fcitx link in / usr / bin in;

[root@localhost beinan]# ln -s /opt/fcitx/bin/fcitx  /usr/bin/fcitx

Under normal circumstances have to say, but most do not provide software to uninstall source packages; we can find the installation software point of deletion. Mainly to see where you install it in the.

Set the environment variable PATH, see: "In Fedora Core, some commonly used commands how not? Solution Set PATH "

So you can set the PATH to be so;

export PATH=".:/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/X11R6/bin:/sbin:/opt/fcitx/bin"

Of course, this is just an example, fcitx can enter the desktop automatically run, see the installation instructions on http://www.fcitx.org official station; for example just let Hello everybody understand a little;

As another example, for example, I want to install mlterm; and specify the installation directory is / opt / mlterm in; http://mlterm.sourceforge.net

#./configure --prefix=/opt/mlterm
#make
#make install

The software source code package is installed, are installed in the designated / opt directory, so not to know where to install the software; also convenient unloading;

3. Other types of software;


; 1) based on the python and perl programs installed

generally under mounting #perl file.pl; for example: VMware version of Linux installed;
[root@localhost vmware-distrib]# perl vmware-install.pl

Python-based development, have to use to install python file.py

Generic package has a README and INSTALL or DOC files, see the installation documentation;

2) some type of script installer is invoked; #sh use file names

such as NVdia driver installation is one such;

[beinan@localhost ~]# sh NFORCE-Linux-x86-1.0-0306-pkg1.run

Of course, by chmod 755 NFORCE-Linux-x86-1.0-0306-pkg1.run, then ./NFORCE-Linux-x86-1.0-0306-pkg1.run to install;

There are also some file is file.bin

[beinan@localhost ~]# chmod 755 file.bin
[beinan@localhost ~]# ./file.bin

Probably the case. . . . . . . .

Postscript: software installation source packages and special format to write so many, no matter how much writing I will never finish. We mainly to install the software documentation shall prevail; when you install the software, if only a simple application, if the rpm package, as far as possible with the rpm package; mainly convenient and easy to manage;


appendix:

When you install the software, the best system package management tool provided by the respective release for Fedora / Redhat you can refer to the following articles;

0) RPM basis "and describes the application of RPM"

1) Fedora package system management software package tool system-config-packages, and easily add and remove system installation disk provided details see "Fedora package manager system-config-packages"

2) Redhat package management system tools, new point system should be redhat-config-packages, usage and "Fedora package manager system-config-packages" as;

3) apt + synaptic package line installation, removal, upgrading tool; Usage: "apt + synaptic line with the installation or upgrade package Fedora core 4.0"
. 4) yum package line installation, upgrade, removal tool; Usage: " Fedora / Redhat online install an update package, yum articles "

5) All yum and apt tutorial "apt and yum"

6) "file.src.rpm using the method of introduction"

7) "How to compile and install source package software"

Currently apt and yum has been very mature, we recommend the use apt or yum install the software; if the system disk installation package provide, you can use system-config-packages or redhat-config-packages;

Reproduced in: https: //www.cnblogs.com/licheng/archive/2008/01/21/1047228.html

Guess you like

Origin blog.csdn.net/weixin_33816611/article/details/92630415