tar. GZ and tar Bz2 detailed explanation

Time:2022-5-15

Mostly tar GZ and tar Bz2 packaging software, mostly through/ configure ; make ; Make installinstallof Some software makes directly; make install ;
We can pass/ Configure — help to view the functions of the configuration software; Most software is provided/ The function of configure software; There are not a few. If there is no one, don’t use it/ configure ; Make directly; Just make install;
. / configure an important parameter is — prefix. With the — prefix parameter, we can specify the softwareinstallcatalogue When we don’t need this software, just delete the directory of the software;
For example, we can specify fcitxinstallTo / opt / fcitx directory;
[[email protected] fcitx]#./configure –prefix=/opt/fcitx
If we don’t need fcitx, we can directly delete the / opt / fcitx directory;
So in this example, if fcitx is customizedinstallTo the / opt / fcitx directory, completeinstallmethodShould be:
[[email protected] fcitx]# tar jxvf fcitx-3.2-050827.tar.bz2
[[email protected] fcitx]#cd fcitx
[[email protected] fcitx]# ./configure –prefix=/opt/fcitx
[[email protected] fcitx]# make
[[email protected] fcitx]# make install
====================================================================
1、 What is source package software;
As the name suggests, the source code package is the visible software package of the source code, and the software based on Linux and BSD system is the most common; Software visible from domestic sources almost disappeared; Most open source software is produced abroad; Fcitx is the most famous open source software in China; lumaqq; Lumaqq and SCIM et al;
However, the visible source code of the software does not mean that the software is open source. We should also take the license of the software as the standard; For example, some software source code is visible, but he agreed that users can only modify according to his agreed content; Such as VBB forum program; Therefore, whether a software is open source software or not must meet two conditions; First, the source code is visible; Second, there should be loose license certificates, such as GPL certificates;
In GNU Linux or BSD communities, developers will provide us with source code packages while releasing binary packages of software;
2、 What’s the use of source code?
If a software has a source code, anyone can see how it is developed, just like a bottle, such as what is the mold made by the bottle; What materials are needed; Specific use and detailed instructions of the bottle, etc. The open source of software is similar. When developers give us software, they will also tell us how the software is developed; As long as our level is high enough and all the codes are there, we can modify and customize the software to meet our needs; If windows is open source and released in GPL, someone can create more than n windows distributions; Unfortunately, windows is not open sourcesystem
Therefore, the usefulness of the source code of the software is nothing more than the following two points;
1. The software is customized according to the needs of users;
2. Secondary development; Note: it shall be subject to the agreement of the software license certificate, and the developer can only license the secondary development;
3、 HowinstallSoftware packaged in source package;
1. Packaging format of source package;
The source code is generally file tar. gz file. tar. Bz2 or file src. RPM packaging; file. tar. GZ and file tar. The unpacking command in bz2 format is as follows:;
[[email protected] beinan]# tar jxvf file.tar.bz2
[[email protected] beinan]# tar zxvf file.tar.gz
As for file src. For the usage of RPM, see file.src.rpmmethodIntroduction to
2. How to compileinstallSource code package; (most)
1) Unpack the software package and view the help document;
After unpacking a package and entering the unpacked package, we can generally find readme (or realm) and install (or install); Or doc (or DOC) directory; Look at the name and you’ll know it’s almost the same;
For example, we download a relatively new fcitx software package, such as fcitx-3.2-050827 tar. bz2
When we unpack this software package, we will find the following files;
[[email protected] fcitx]# tar jxvf fcitx-3.2-050827.tar.bz2
[[email protected] fcitx]#cd fcitx
[[email protected] 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 the installation and DOC directories of fcitxinstallThe document is; It tells us howinstall
SometimesinstallThe document will also have detailed instructions on the developer’s home page and the handling of common problems; For example, lumaqq
2) CompileinstallSoftware conditions;
First of all, we must at least put the development tools in the Linux systeminstallFor example, GCC; perl; python; glibc; gtk; make ; Automake and other development tools or basic packages; still moreinstallSome corresponding development packages, usually with the file name including dev, such as kernel devel; There are also some development libraries, such as those starting with lib; If you are compiling software, sometimes you will be prompted that something is missing, which is more or less the development tools and libraries; Find out from the discinstallThat’s it; Sometimes the CD-ROM is not provided. Please use Google to search for the corresponding software package. Sometimes you may also use the source package compilationinstallDependent package;
Sometimes originallysystemAlready ininstallThe package on which it depends was, butsystemTip: what should I do if I can’t find it? We are needed at this timeset upCheck PKG_ CONFIG_ The environment variable of path is OK;
#export PKG_CONFIG_PATH=/usr/lib/pkgconfig
or
#export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Then we’ll run the compiled/ configure ; make ; Make install, try it;
Programs developed with java development tools need JRE or JDK; JDK already includes JRE, so if we only need an environment for Java programs to run, we only needinstallJust JRE;installOK JRE, just configure the Java environment variables. If it is a graphical interface program, click the mouse to be OK;
The program developed with Perl needs Perl environment, so we must put the Perl packageinstallIn fact, Python is the same;
3) CompileinstallSoftwaremethod
Mostly tar GZ and tar Bz2 packaging software, mostly through/ configure ; make ; Make installinstallof Some software makes directly; make install ;
We can pass/ Configure — help to view the functions of the configuration software; Most software is provided/ The function of configure software; There are not a few. If there is no one, don’t use it/ configure ; Make directly; Just make install;
. / configure an important parameter is — prefix. With the — prefix parameter, we can specify the softwareinstallcatalogue When we don’t need this software, just delete the directory of the software;
For example, we can specify fcitxinstallTo / opt / fcitx directory;
[[email protected] fcitx]#./configure –prefix=/opt/fcitx
If we don’t need fcitx, we can directly delete the / opt / fcitx directory;
So in this example, if fcitx is customizedinstallTo the / opt / fcitx directory, completeinstallmethodShould be:
[[email protected] fcitx]# tar jxvf fcitx-3.2-050827.tar.bz2
[[email protected] fcitx]#cd fcitx
[[email protected] fcitx]# ./configure –prefix=/opt/fcitx
[[email protected] fcitx]# make
[[email protected] fcitx]# make install
Call fcitx, which should be
[[email protected] ~]#/opt/fcitx/bin/fcitx
If you want fcitx to be called as long as you execute fcitx, please configure the environment variable or make a link to fcitx in / usr / bin;
[[email protected] beinan]# ln -s /opt/fcitx/bin/fcitx /usr/bin/fcitx
In general, it is said, but most software does not provide the uninstallation of the source packagemethod; We can find the softwareinstallClick delete. It mainly depends on how you put itinstallWhere is it.
set upFor the environment variable path, see: Why are some common commands not available in Fedora Core?solvewayset upPATH》
So your path canset upLike this;
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 run automatically on the desktop. See http://www.fcitx.org On the official stationinstallexplain; For example, just to make everyone understand better;
Another example, for example, I thinkinstallmlterm ; And specifyinstallThe directory is / opt / mlterm; http://mlterm.sourceforge.net
#./configure –prefix=/opt/mlterm
#make
#make install
Put the source code packageinstallSoftware, all specifiedinstallIn the / opt directory, so you don’t know the softwareinstallWhere is it; It is also convenient for unloading;
3. Other types of software;
1) Design of program based on Perl and pythoninstall
In general, use #perl file PL installation; For example, the Linux version of VMwareinstall
[[email protected] vmware-distrib]# perl vmware-install.pl
Python file is also used for development based on python Py come oninstall
Generally, software packages have readme, install or DOC documents. See the documentsinstall
2) SomeinstallThe program is a script call; To use #sh file names
For example, nvdia driveninstallThat’s it;
[[email protected] ~]# sh NFORCE-Linux-x86-1.0-0306-pkg1.run
Of course, you can also use Chmod 755 nforce-linux-x86-1.0-0306-pkg1 Run, then/ NFORCE-Linux-x86-1.0-0306-pkg1. Run come oninstall
Some are based on file Bin file
[[email protected] ~]# chmod 755 file.bin
[[email protected] ~]# ./file.bin
Mostly so……..
Postscript: source package and special format softwareinstallJust write so much, no matter how much you write, you can’t finish it. We mainly focus on softwareinstallDocuments shall prevail;installWhen using the software, if it is only a simple application, if there is an RPM package, use the RPM package as much as possible; It is mainly convenient and easy to manage;
Appendix:
installWhen using software, it is best to use the software provided by their respective distributionsystemSoftware package management tool. For Fedora / RedHat, you can refer to the following articles;
0) RPM fundamentals introduction and application of RPM
1)Fedora systemThe management software package tool system config packages is convenient to add and removesysteminstallPlease refer to Fedora package manager system config packages for details of the software package provided on the disk
2)Redhat systemManagement software package tools, newsystemIt should be RedHat config packages. The usage is the same as Fedora package manager system config packages;
3) Apt + Synaptic Package Onlineinstall, remove and upgrade tools; Usage: use apt + synaptic OnlineinstallOr upgrade Fedora Core 4.0 package
4) Yum package onlineinstall, upgrade and remove tools; Usage: Fedora / RedHat OnlineinstallUpdate package, yum
5) Use of file.src.rpmmethodIntroduction to
6) How to compileinstallSource package software
At present, apt and Yum are very mature. We suggest that weinstallApt or Yum is used for software; IfinstallsystemThe software package provided by the disk can be system config packages or RedHat config packages
 

Recommended Today

P5131 Load and take fusion – count dp, combined count

This problem is a counting problem, which requires some optimization. simple idea From the title and data range, it can be guessed that the time complexity of the algorithm is about\(O(nk)\), so it is not difficult to think of using dynamic programming:Assume\(f(i,j)\)before\(i\)selected number\(j\)total value ofThen the state transition equation is \[f(i,j)=f(i-1,j)+f(i,j-1)\times a_i \] i.e. not […]