我是靠谱客的博主 丰富寒风,最近开发中收集的这篇文章主要介绍无法定位软件包 deepin-boot-maker_Linux最全软件包管理!看这个就对了! Wayne,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述

软件包命名规则的定义:
1
name-Version-release.arch.rpm
2
软件包的分类和拆包:
3
Application-Version-Arch.rpm,主包
4
Application-devel-Version-Arch.rpm,开发包
5
Application-utils-Version-Arch.rpm
6
Application-libs-Version-Arch.rpm
7
由于包之间存在存在依赖关系,所以解决依赖包管理工具
8
yum:rpm的前端管理工具
9
apt-get:debian
10
dnf:Fedora 18+
查看二进制程序依赖的库文件
ldd BINARY_FILE

查看系统已经装载的所有的库文件
ldconfig -p,显示本已经缓存的库文件

加载库的配置文件路径:/etc/ld.so.conf.d/*.conf,/etc/ld.so.conf
包管理器:
实现程序包的安装、卸载、查询、升级和校验等管理操作
包文件的组成:
rpm包内文件
rpm的元数据
安装或卸载时的脚本
rpm安装包的数据库文件路径:/var/lib/rpm,如果删除这数据库,则无法实现原来的软件的安装、查询,等操作

rpm
rpm {-i|install}[install-options] PACKAGE_FILE
-i,install
-v,verbose
-h,以#显示安装进度

rpm -K,检查程序包的完整性

rpm --import,导入程序包的密钥
rpm --root,指定安装的程序包的目录

rpm -q,查询时只需使用包名
--scripts,查询安装包里的脚本

rpm -qa,查询所有符合条件的包

rpm -ql,列出包安装后生成的文件列表

rpm -qf,查询某个文件是那个安装包生成的

rpm -p,查询还没安装的软件包的信息,通常与i,d,c等选项一起使用
rpm -qc,查询程序包的安装后生成配置文件

rpm -qd,查询程序包安装后生成的帮助文档

rpm -qi,查询程序包的详细信息

rpm --whatprovider CAPABILITY,查询指定CAPABILITY由那个包提供
[install-options]
--test,测试安装,不真正执行安装
--nodeps,忽略依赖关系,安装包时,包存在的依赖关系
--replacepkgs|replacefiles,覆盖安装,当某个包出现错误时,可以使用此选项
--nochecksignture,不检测来源的合法性,默认是检查
--nodigest,不检测包的完整性,默认是检查
--noscripts,不执行程序包里的脚本
%pre
--nopre
%post
--nopost
%preun
--nopreun
%postun --nopostun
升级:
rpm {-u|--upgrade}[install-options] PACKAGE_FILE
upgrade,安装有旧版本,则升级,不存在则安装
freshen,安装有旧版本,则升级,不存在则不升级
强制:
force
注意:
1. 内核包的升级,一般使用安装新的内核包(rpm -ivh kernel-version),而不使用升级操作,实现多内核版本并存

2. 如果原程序包的配置文件曾被修改,安装或者升级该程序包,原有的程序包的配置文件将被自动重名为Package.rpm.config
卸载
rpm {-e|--erase}[--allmatches][--nodeps][--noscripts]PACKAGE_NAME...

校验
rpm{-V|--verify}[select-options][verify-options]
S file
M Mode
5 digest,md5
T timestamp
U user ownership
G group ownership

rpm包解包
rpm2cpio PACKAGE_FILE | cpio -idv

yum,解决rpm安装二进制程序时的产生的依赖关系
repo仓库的路径:/etc/yum.repos.d/
repo的缓存目录:/var/yum/cache
创建一个repo仓库:在/etc/yum.repos.d/新建一个*.repo文件
文件服务器:
http://
ftp://
file://
示例:

yum [options] command
command
repolist,列出所有的repo仓库

yum install,安装指定的二进制程序

yum search,搜索仓库里带有特定关键字的包

yum
list,显示当前仓库的所有的包
installed,当前系统已经安装的包

yum remove,卸载指定的二进制程序
yum info,显示仓库里指定二进制程序的信息

yum history,显示yum命令的执行历史
info,显示yum历史的详细信息

yum
history list,显示已经执行过的yum的历史
yum histrory undo,撤销yum命令历史中指定的id执行的操作,相当于移除

yum history redo,重新执行yum命令历史中指定的id执行的操作,相当于安装

yum clean,清理yum仓库的缓存信息
all,清理所有缓存信息

yum的repo配置文件中常用的变量
$realsever,当前OS的主版本号
$arch,平台
$basearch,基础平台
yum-config-manager --enable "仓库名"
yum-config-manager --disable "仓库名"

包组管理的相关命令:
yum groupinstall group1 [group2] [...]
yum groupupdate group1 [group2] [...]
yum grouplist [hidden] [groupwildcard] [...]
yum groupremove group1 [group2] [...]
yum groupinfo group1 [...]
yum的命令行选项:
--nogpgcheck:禁止进行gpg check
-y: 自动回答为“yes”
-q:静默模式
--disablerepo=repoidglob:临时禁用此处指定的repo
--enablerepo=repoidglob:临时启用此处指定的repo
--noplugins:禁用所有插件
程序包编译
CC++:make项目管理器
configure脚本 --> Makefile.in
--> Makefile
C语言源代码编译三步骤:
1. ./configure脚本
(1)传递相应的参数,指定启用特性等,生成相应的Makefile
(2)检查依赖的软件包
2. Make
3. Makeinstll
【年薪30w工程师吐血整理资料大合集】
领取IT资料大合集:http://image.qbangmang.com/counselor.html

最后
以上就是丰富寒风为你收集整理的无法定位软件包 deepin-boot-maker_Linux最全软件包管理!看这个就对了! Wayne的全部内容,希望文章能够帮你解决无法定位软件包 deepin-boot-maker_Linux最全软件包管理!看这个就对了! Wayne所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复