简体   繁体   English

无法在Fedora上安装php7

[英]Unable to install php7 on fedora

I am running Fedora 24 on my development workstation. 我在开发工作站上运行Fedora 24。 Eclipse needs php executables that match those on the server (Centos). Eclipse需要与服务器上(Centos)匹配的php可执行文件。

I have installed the remi-release repository and followed the instructions at https://blog.remirepo.net/post/2016/12/05/Install-PHP-7.1-on-CentOS-RHEL-or-Fedora : 我已经安装了remi-release存储库并按照https://blog.remirepo.net/post/2016/12/05/Install-PHP-7.1-on-CentOS-RHEL-or-Fedora中的说明进行操作:

# wget http://rpms.remirepo.net/fedora/remi-release-24.rpm
# dnf install remi-release-24.rpm
# dnf install dnf-plugins-core
# dnf config-manager --set-enabled remi-php71
# dnf update

When I invoke php there is no php: 当我调用php时,没有php:

# php -v
bash: /usr/bin/php: No such file or directory

Where are the executables located? 可执行文件在哪里? There does not seem to be any php installed. 似乎没有安装任何PHP。

Help! 救命!

Remi repository provides various PHP Versions for Fedora. Remi仓库为Fedora提供了各种PHP版本。

  • Versions older than default base version are only available as Software Collections (php70 way suggested by @Peter 比默认基本版本更早的版本仅作为软件集合提供(@Peter建议使用php70方式)
  • Newer versions are provided both as base packages and SCL 提供基本版本和SCL的较新版本

See the configuration wizard . 请参阅配置向导

But as you are running Fedora 24 which is now EOL, I heartly recommend you to upgrade to a supported version: 但是,由于您正在运行现在已停产的Fedora 24,因此我强烈建议您升级到受支持的版本:

  • Fedora 25 provides PHP 7.0 Fedora 25提供了PHP 7.0
  • Fedora 26 provides PHP 7.1 Fedora 26提供了PHP 7.1
  • Fedora 27 will provide PHP 7.1 Fedora 27将提供PHP 7.1
  • Fedora 28 will provide PHP 7.2 Fedora 28将提供PHP 7.2

If you are interested in running multiple versions, you can read My PHP Workstation 如果您对运行多个版本感兴趣,可以阅读My PHP Workstation。

The solution is in my comment. 解决方案在我的评论中。 It was necessary to do this: 有必要这样做:

# dnf config-manager --set-enabled remi
# dnf install php70

Then I put a symbolic link from /usr/bin/php to /usr/bin/php70 然后我将符号链接从/ usr / bin / php到/ usr / bin / php70

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM