rpm -qa 不显示编译安装的软件包

编译安装完nginx后遇到问题,
查看发现

[root@localhost nginx-1.16.1]# rpm -qa  nginx
[root@localhost nginx-1.16.1]# 
[root@localhost nginx-1.16.1]# 
[root@localhost nginx-1.16.1]# nginx  -t
nginx: the configuration file /application/nginx-1.16.1//conf/nginx.conf syntax is ok
nginx: configuration file /application/nginx-1.16.1//conf/nginx.conf test is successful
[root@localhost nginx-1.16.1]# 

rpm安装,需要rpm包,需要符合打包规范,安装后信息回存到某个数据库中去。rpm查询命令,从数据库中查找。直接源码编译安装,是没有存储这种信息的。查不到正常。

所谓编译安装,我们可以下载别人写的源代码,一般包含了Makefile配置文件。
安装一般分为以下步骤:
make config 可选,做依赖检测,某些程序可能会动态生成Makefile文件。一般就写的一些shell命令。

make 必须运行,执行程序编译。
01 把生成的库文件拷贝到/usr/lib或者/usr/local/lib目录下,未必会生成库文件;
02 把可执行文件拷贝到/usr/bin/或者/usr/localbin下,未必会生成。
make clean 清理源码包
把临时文件,目标文件,程序文件,库文件从源码路径下删除掉
整个Makefile文件遵循一定规范,由一些编译,shell命令组成。
以上就是rpm -qa 查询不出源码安装程序的具体原因。

来源:百度知道
https://zhidao.baidu.com/question/1771976984774298140.html

发布了170 篇原创文章 · 获赞 15 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/weixin_42506599/article/details/104254632
QA