【发布时间】:2018-05-21 07:46:39
【问题描述】:
我需要安装一些软件包来为在 VB 中运行的 Debian 9 OS 中的项目准备工作区。我有指示:
----------------------------------------------------------------------
The following Debian 8 packages are required to run [X-Product]:
sudo apt-get install exim4 ntp pwgen curl php5-dev php-pear pkg-config nmap libzmq3 libzmq3-dev libapache2-mod-php5 apache2 percona-server-server-5.6 php5-cli php5-mysql php5-curl php5-intl daemontools-run oracle-java8-installer ant ruby-compass libtool-bin
----------------------------------------------------------------------
当我运行命令时,我得到以下终端堆栈,
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package php5-mysql is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package php5-curl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package libapache2-mod-php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Unable to locate package php5-dev
E: Unable to locate package libzmq3
E: Package 'libapache2-mod-php5' has no installation candidate
E: Package 'php5-cli' has no installation candidate
E: Package 'php5-mysql' has no installation candidate
E: Package 'php5-curl' has no installation candidate
E: Unable to locate package php5-intl
我在网上做了一些研究,接下来做了以下,
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
这对我一点帮助都没有。我需要什么来解决这个问题?如果你问,我对 Debian 知之甚少
注意:我按照提供的答案中的说明进行操作,问题仍然没有解决,就像我看不到php version
当我运行命令时
sudo apt-get install php5.6
在终端打印,
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php5.6-json' for regex 'php5.6'
Note, selecting 'php5.6-common' for regex 'php5.6'
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
要查找PHP 版本,
sudo php -v
在终端打印,
sudo: php: command not found
如果我运行它的更多信息
sudo apt-get install php5-dev
I get error
E: Unable to locate package php5-dev
但是,命令
sudo apt-get install php-dev成功
命令
dpkg -l | grep php| awk '{print $2}' |tr "\n" " " 返回值,
这是否意味着我安装了 php7 并且阻止了其他操作?
dh-php php-cli php-common php-dev php-gd php-pear php-xml php7.0-cli php7.0-common php7.0-dev php7.0-gd php7.0-json php7.0-opcache php7.0-readline php7.0-xml pkg-php-tools
【问题讨论】:
-
不,我还有问题
-
我发现this 的帖子对于在 debian 上安装 5.6 版本的 PHP 很有用