我第一次使用 AWS vps,所以对使用服务器不太了解
使用PHP Version 7.0.28-0 ubuntu0.16.04.1
在网上搜索后,我发现 wordpress 无法从仪表盘上传文件,我找到了这个解决方案
所有步骤都已完成但卡住了sudo apt-get install php5-dev libssh2-1-dev libssh2-php
当我输入此命令时我在命令行中收到以下消息
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-dev 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 libssh2-php 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
However the following packages replace it:
php-ssh2
E: Package 'php5-dev' has no installation candidate
E: Package 'libssh2-php' has no installation candidate
请让我知道解决方案或替代方案
提前致谢
答案1
您正在关注的 DigitalOcean 指南是已弃用并且没有针对当今的 Ubuntu 正确版本进行更新。他们的指南顶部有说明。它是为 Ubuntu 12.04 编写的
然而,在 16.04 中,PHP5 已不存在,因为它现在使用 PHP7。此外,libssh2-php
已重命名为php-ssh2
。
安装php-dev
(安装 PHP 7 dev 库)和php-ssh2
:
sudo apt-get install php-dev php-ssh2
这应该会安装您正在寻找的 16.04 等效软件包。