德斯软件资讯2月5日消息,Linux应用软件通常有三个安装包:
焦油袋,如software-1.2.3-1.tar.gz。它是用UNIX系统的打包工具tar打包的。
Rpm包,比如software-1.2.3-1.i386.rpm .它是Redhat Linux提供的一种包封装格式。
Dpkg包,比如software-1.2.3-1.deb .它是Debain Linux提供的一种包封装格式。
大多数Linux应用程序包的命名也有一定的规则,如下所示:
名称-版本-修订-类型
例如:
Software-1.2.3-1.tar.gz的意思是:
软件名称:软件
版本号:1.2.3
修订版:1
类型:tar.gz,表明它是一个焦油包。
sfotware-1.2.3-1.i386.rpm
软件名称:软件
版本号:1.2.3
修订版:1
可用平台:i386,适用于英特尔80x86平台。
类型:rpm,表示它是一个rpm包。
注意:由于rpm格式通常是编译好的程序,所以有必要指定平台。
软件-1.2.3-1.deb请自行练习。
Linux应用程序的软件包可以包含两种不同的内容:
一个是可执行文件,解包后可以直接运行。Windows中的所有软件包都是这种类型。安装这个程序后,就可以使用了,但是看不到源程序。而且下载的时候要注意这个软件是不是你用的平台,否则无法正常安装。
另一种是源程序,即解包后需要用编译器编译成可执行文件。这一点在Windows系统中几乎是没有的,因为Windows的思想就是不开放源程序。
通常,所有用tar打包的包都是源程序;而那些用rpm和dpkg打包的通常是可执行程序。一般来说,自己编译源程序可以更加灵活,但也容易遇到各种问题和困难。相对来说,下载那些可执行包,更容易完成软件安装,当然灵活性也差很多。因此,一般来说,一个软件总是会为安装程序提供多种打包格式。可以根据自己的情况选择。
固定
整个安装过程可分为以下步骤:
获得应用软件:通过下载和购买光盘;
解压文件:一般tar包会再次压缩,比如gzip和bz2,所以需要先解压。如果是最常见的gz格式,可以执行“tar -xvzf包名”,一步就可以完成解压和解包工作。如果没有,先用解压软件,然后执行“tar -xvf解压后的tar包”进行解包;
阅读附加的安装文件和自述文件;
执行”。/configure "命令准备编译;
执行“make”命令编译软件;
执行“make install”以完成安装;
执行“清理”删除安装过程中生成的临时文件。
好吧,就这样。我们可以运行应用程序。但是这个时候,有些读者会问,我该怎么实现呢?这也是Linux特性的问题。其实一般来说,Linux应用软件的可执行文件都会存放在/usr/local/bin目录下!然而,这并不是一个“放之四海而皆准”的真理。最靠谱的就是看这个软件的安装和自述文件,一般都有说明。
从计算机上卸载
通常情况下,软件开发者很少考虑如何卸载自己的软件,tar只是完成打包工作,所以并没有提供很好的卸载方法。
那么是不是意味着不能卸载呢?其实不是的。有两个软件可以解决这个问题,就是Kinstall和Kife,这两个软件是安装和卸载tar包的黄金搭档。如何使用它们,笔者将分别介绍。这里就不赘述了。
Rpm是Redhat公司的一大贡献,让Linux软件的安装变得更加容易。
固定
执行:
Rpm -ivh rpm包名
更高级,请看下表:
Rpm参数描述-我安装软件-t测试安装,不是真实安装-p显示安装进度-f忽略任何错误-U升级安装-v检查套件安装是否正确。
这些参数可以同时使用。有关更多信息,请参考RPM的命令帮助。
从计算机上卸载
我只需要一句简单的话,我就能说完。执行:
rpm–e软件名称
不过需要注意的是,后面用的是软件名,不是包名。例如,要安装软件-1.2.3-1.i386.rpm软件包,您应该执行:
rpm–IVH软件-1.2.3-1.i386.rpm
卸载时,您应该执行:
rpm–e软件.
此外,Linux中提供了图形化的RPM工具,如GnoRPM和kpackage,这使得整个过程更加容易。这些软件的具体应用将在另一篇文章中介绍。
这是Debian Linux提供的一个包管理器,和RPM很像。但是因为RPM出现的比较早,所以在所有版本的Linux中都很常见。但是debian的包管理器dpkg只出现在Debina Linux中,其他Linux版本一般不会出现。我们将在此简要说明:
固定
DPKG-IDEB包装名称
比如:
dpkg–I软件-1.2.3-1.deb
从计算机上卸载
dpkg–e软件名称
比如:
dpkg–e软件
今天就分享到这里吧,德斯软件资讯是一个软件分享基地,其中包括微信,红包辅助,淘米购,叮咚盲盒,享乐好物,支付宝,淘盟铺,惠易购,青蛙易购,香蕉赶集,乐享购,亲聊,探聊,诚智通,伶信,QQ,新易选,点约,淘客购,易民购,梦幻盲盒,淘个购,旗语,优品铺,赞聊,苹果微信多开,微信分身,安卓微信多开,创信等社交平台的功能有避雷,埋雷软件,单透,扫尾,秒抢等一些红包强项外挂功能软件分享。喜欢的请关注收藏,谢谢。