Description of problem: 安装好的php软件包中没有任何文件 Version-Release number of selected component (if applicable): [root@iZbp1bt9gl5udio28dpy1kZ ~]# cat /etc/os-release NAME="Anolis OS" VERSION="23" ID="anolis" VERSION_ID="23" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" [root@iZbp1bt9gl5udio28dpy1kZ ~]# rpm -q php php-8.1.9-1.an23.x86_64 How reproducible: rpm -ql php Steps to Reproduce: [root@iZbp1bt9gl5udio28dpy1kZ ~]# yum install php.x86_64 Last metadata expiration check: 1:33:15 ago on Thu 29 Sep 2022 03:16:56 PM CST. Dependencies resolved. ============================================================================================================================================================================================================================================================== Package Architecture Version Repository Size ============================================================================================================================================================================================================================================================== Installing: php x86_64 8.1.9-1.an23 AppStream 7.0 k Transaction Summary ============================================================================================================================================================================================================================================================== Install 1 Package Total download size: 7.0 k Installed size: 0 Is this ok [y/N]: y Downloading Packages: php-8.1.9-1.an23.x86_64.rpm 78 kB/s | 7.0 kB 00:00 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 77 kB/s | 7.0 kB 00:00 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : php-8.1.9-1.an23.x86_64 1/1 Verifying : php-8.1.9-1.an23.x86_64 1/1 Installed: php-8.1.9-1.an23.x86_64 Complete! [root@iZbp1bt9gl5udio28dpy1kZ ~]# rpm -ql php (contains no files) [root@iZbp1bt9gl5udio28dpy1kZ ~]# rpm -qa | grep php php-common-8.1.9-1.an23.x86_64 php-cli-8.1.9-1.an23.x86_64 php-fpm-8.1.9-1.an23.x86_64 php-mbstring-8.1.9-1.an23.x86_64 php-opcache-8.1.9-1.an23.x86_64 php-pdo-8.1.9-1.an23.x86_64 php-xml-8.1.9-1.an23.x86_64 php-8.1.9-1.an23.x86_64 [root@iZbp1bt9gl5udio28dpy1kZ ~]# rpm -ql php-8.1.9-1.an23.x86_64 (contains no files) [root@iZbp1bt9gl5udio28dpy1kZ ~]# rpm -q php php-8.1.9-1.an23.x86_64 [root@iZbp1bt9gl5udio28dpy1kZ ~]# rpm -ql php-8.1.9-1.an23.x86_64 (contains no files) [root@iZbp1bt9gl5udio28dpy1kZ ~]# uname -r 5.19.0-1.an23.x86_64 [root@iZbp1bt9gl5udio28dpy1kZ ~]# yum update php Last metadata expiration check: 1:59:57 ago on Thu 29 Sep 2022 03:16:56 PM CST. Dependencies resolved. Nothing to do. Complete! Actual results: 见步骤 Expected results: rpm -ql php能看到php软件包的文件列表 Additional info: Anolis8 的结果: [root@nu1l07429 ~]# rpm -ql php /etc/httpd/conf.d/php.conf /etc/httpd/conf.modules.d/15-php.conf /usr/lib/.build-id /usr/lib/.build-id/b9 /usr/lib/.build-id/b9/7b865a77cadbf2fcc281bc1537705e59c081e6 /usr/lib64/httpd/modules/libphp7.so /usr/share/httpd/icons/php.gif /var/lib/php/opcache /var/lib/php/session /var/lib/php/wsdlcache
Anolis OS 23在构建php时与Anolis OS 8的差异导致。 构建参数关闭了modphp,从spec中查看到该模块已被废弃: The php package contains the module (often referred to as mod_php) which adds support for the PHP language to Apache HTTP Server when running in prefork mode. This module is deprecated. 某一些软件包的主包是空包是正常行为,他会通过定义依赖关系来保证软件可用。 可以测试看看php是否可用。