如何在 Linux 版本 3.10.0 kbuilder.dev.centos.org 上安装 PHP 7.3) (Red Hat 4.8.5-11)

How to install PHP 7.3 on Linux version 3.10.0 kbuilder.dev.centos.org) (Red Hat 4.8.5-11)

我试试这个教程:https://computingforgeeks.com/how-to-install-php-7-3-on-centos-7-fedora/

我的方式是: [root@intranet ~]# sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm ..... 完成!

下一步: [root@intranet ~]# sudo yum -y install epel-release yum-utils ... 完全的! [root@intranet ~]# sudo yum-config-manager -- 禁用remi-php54

Loaded plugins: fastestmirror, langpacks
=================================================================== repo: remi-php54 ===================================================================
[remi-php54]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/7/remi-php54
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = False
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7/remi-php54/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7/remi-php54/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/7/remi-php54/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist = http://cdn.remirepo.net/enterprise/7/php54/mirror
mirrorlist_expire = 86400
name = Remi's PHP 5.4 RPM repository for Enterprise Linux 7 - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7/remi-php54
pkgdir = /var/cache/yum/x86_64/7/remi-php54/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
ui_id = remi-php54
ui_repoid_vars = releasever,
   basearch
username =

[root@intranet ~]# sudo yum-config-manager -- 启用remi-php73

Loaded plugins: fastestmirror, langpacks
=================================================================== repo: remi-php73 ===================================================================
[remi-php73]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl =
cache = 0
cachedir = /var/cache/yum/x86_64/7/remi-php73
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = False
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7/remi-php73/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7/remi-php73/gpgdir
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
hdrdir = /var/cache/yum/x86_64/7/remi-php73/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist = http://cdn.remirepo.net/enterprise/7/php73/mirror
mirrorlist_expire = 86400
name = Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7/remi-php73
pkgdir = /var/cache/yum/x86_64/7/remi-php73/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
ui_id = remi-php73
ui_repoid_vars = releasever,
   basearch
username =

下一步我有一些错误:

[root@intranet ~]# sudo yum -y install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bc                                                                                     math php-json
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.icm.edu.pl
 * epel: ftp.icm.edu.pl
 * extras: ftp.icm.edu.pl
 * remi-safe: mirror.reconn.ru
 * updates: ftp.icm.edu.pl
Package 1:php-pear-1.9.4-21.el7.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-42.el7 will be updated
---> Package php.x86_64 0:5.4.16-46.1.el7_7 will be an update
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: php-5.4.16-46.1.el7_7.x86_64
---> Package php-bcmath.x86_64 0:5.4.16-42.el7 will be updated
---> Package php-bcmath.x86_64 0:5.4.16-46.1.el7_7 will be an update
---> Package php-cli.x86_64 0:5.4.16-42.el7 will be updated
---> Package php-cli.x86_64 0:5.4.16-46.1.el7_7 will be an update
---> Package php-common.x86_64 0:5.4.16-42.el7 will be updated
--> Processing Dependency: php-common(x86-64) = 5.4.16-42.el7 for package: php-pdo-5.4.16-42.el7.x86_64
--> Processing Dependency: php-common(x86-64) = 5.4.16-42.el7 for package: php-ldap-5.4.16-42.el7.x86_64
--> Processing Dependency: php-common(x86-64) = 5.4.16-42.el7 for package: php-process-5.4.16-42.el7.x86_64
---> Package php-common.x86_64 0:5.4.16-46.1.el7_7 will be an update
---> Package php-devel.x86_64 0:5.4.16-46.1.el7_7 will be installed
--> Processing Dependency: pcre-devel(x86-64) for package: php-devel-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: automake for package: php-devel-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: autoconf for package: php-devel-5.4.16-46.1.el7_7.x86_64
---> Package php-fpm.x86_64 0:5.4.16-46.1.el7_7 will be installed
---> Package php-gd.x86_64 0:5.4.16-42.el7 will be updated
---> Package php-gd.x86_64 0:5.4.16-46.1.el7_7 will be an update
---> Package php-mbstring.x86_64 0:5.4.16-42.el7 will be updated
---> Package php-mbstring.x86_64 0:5.4.16-46.1.el7_7 will be an update
---> Package php-mcrypt.x86_64 0:5.4.16-7.el7 will be updated
---> Package php-mcrypt.x86_64 0:5.4.16-9.el7 will be an update
---> Package php-mysqlnd.x86_64 0:5.4.16-46.1.el7_7 will be installed
---> Package php-xml.x86_64 0:5.4.16-42.el7 will be updated
---> Package php-xml.x86_64 0:5.4.16-46.1.el7_7 will be an update
--> Running transaction check
---> Package autoconf.noarch 0:2.69-11.el7 will be installed
--> Processing Dependency: m4 >= 1.4.14 for package: autoconf-2.69-11.el7.noarch
---> Package automake.noarch 0:1.13.4-3.el7 will be installed
---> Package openssl-libs.x86_64 1:1.0.1e-60.el7_3.1 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-60.el7_3.1 for package: 1:openssl-1.0.1e-60.el7_3.1.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-19.el7 will be an update
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
--> Processing Dependency: pcre(x86-64) = 8.32-17.el7 for package: pcre-devel-8.32-17.el7.x86_64
---> Package php-ldap.x86_64 0:5.4.16-42.el7 will be updated
---> Package php-ldap.x86_64 0:5.4.16-46.1.el7_7 will be an update
---> Package php-pdo.x86_64 0:5.4.16-42.el7 will be updated
--> Processing Dependency: php-pdo(x86-64) = 5.4.16-42.el7 for package: php-mysql-5.4.16-42.el7.x86_64
---> Package php-pdo.x86_64 0:5.4.16-46.1.el7_7 will be an update
---> Package php-process.x86_64 0:5.4.16-42.el7 will be updated
---> Package php-process.x86_64 0:5.4.16-46.1.el7_7 will be an update
--> Running transaction check
---> Package m4.x86_64 0:1.4.16-10.el7 will be installed
---> Package openssl.x86_64 1:1.0.1e-60.el7_3.1 will be updated
---> Package openssl.x86_64 1:1.0.2k-19.el7 will be an update
---> Package pcre.x86_64 0:8.32-15.el7_2.1 will be updated
---> Package pcre.x86_64 0:8.32-17.el7 will be an update
---> Package php-mysql.x86_64 0:5.4.16-42.el7 will be updated
---> Package php-mysql.x86_64 0:5.4.16-46.1.el7_7 will be an update
--> Processing Conflict: php-mysql-5.4.16-46.1.el7_7.x86_64 conflicts php-mysqlnd
--> Finished Dependency Resolution
Error: php-mysql conflicts with php-mysqlnd-5.4.16-46.1.el7_7.x86_64
 You could try using --skip-broken to work around the problem
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
ipa-client-4.4.0-14.el7.centos.7.x86_64 has installed conflicts freeipa-client: ipa-client-4.4.0-14.el7.centos.7.x86_64
ipa-client-common-4.4.0-14.el7.centos.7.noarch has installed conflicts freeipa-client-common: ipa-client-common-4.4.0-14.el7.centos.7.noarch
ipa-common-4.4.0-14.el7.centos.7.noarch has installed conflicts freeipa-common: ipa-common-4.4.0-14.el7.centos.7.noarch

**[root@intranet ~]# php -v

PHP 5.4.16 (cli) (built: Nov  6 2016 00:29:02)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

[root@intranet ~]# cat /proc/version

Linux version 3.10.0-514.16.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Apr 12 15:04:24 UTC 2017**

mysql 扩展程序在 PHP 7.

中不再存在

如果确实需要,可以不更新。

如果mysqlipdo_mysql 就够了,你必须先切换到 php-mysqlnd 软件包,在尝试升级到较新版本之前。

yum remove php-mysql
yum install php-mysqlnd

您可以使用 yum shell 执行相同的操作以避免删除依赖项

yum shell 
remove php-mysql
install php-mysqlnd
run

替换后,您将可以更新到较新的版本。

待测试:也许一个简单的 yum update(而不是冗长的 yum install 命令)会起作用。

wizard

所述