我正在尝试安装 php5.6-curl 包。它之前已经安装过,但是我手动构建了 curl,所以我从系统中删除了 php5.6-curl 包。我也运行了apt autoremove
这个操作。
成功构建内容后,我尝试php5.6-curl
从 PPA 重新安装该包,它显示了这个。
$ sudo apt-get install php5.6-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5.6-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
E: Package 'php5.6-curl' has no installation candidate
我确定 ppa:ondrej/php5-5.6 已安装,因为系统中存在 php5.6,并且之前已安装 php5.6-curl 包。
我也尝试再次添加 PPA 并运行apt-get update
。我不确定这些消息是什么意思。
http://ppa.launchpad.net/ondrej/php/ubuntu yakkety InRelease
.....
Fetched 107 kB in 3s (31.9 kB/s)
Reading package lists... Done
W: The repository 'http://ppa.launchpad.net/shutter/ppa/ubuntu yakkety Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://repo.skype.com/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3
W: The repository 'https://repo.skype.com/deb stable InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: https://linuxdesktopcloud.mail.ru/screenshoter/deb/dists/appind/InRelease: Signature by key 8A99BA500079839DF7DE4833196205AF7396FF77 uses weak digest algorithm (SHA1)
E: Failed to fetch http://ppa.launchpad.net/shutter/ppa/ubuntu/dists/yakkety/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
接下来我尝试检查 php 扩展。没有 php5.6-curl 但我知道它应该在那里。
$ apt-cache search php5.6
php-igbinary - igbinary PHP serializer
php-msgpack - PHP extension for interfacing with MessagePack
php-ssh2 - Bindings for the libssh2 library
php-xdebug - Xdebug Module for PHP
php5.6-opcache - Zend OpCache module for PHP
php5.6-mysql - MySQL module for PHP
php5.6-json - JSON module for PHP
php5.6-common - documentation, examples and common module for PHP
php5.6 - server-side, HTML-embedded scripting language (metapackage)
php5.6-mcrypt - libmcrypt module for PHP
php5.6-readline - readline module for PHP
php5.6-gd - GD module for PHP
php5.6-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP
php5.6-cli - command-line interpreter for the PHP scripting language
php5.6-mbstring - MBSTRING module for PHP
php5.6-ldap - LDAP module for PHP
libapache2-mod-php5.6 - server-side, HTML-embedded scripting language (Apache 2 module)
php-memcached - memcached extension module for PHP, uses libmemcached
我还在云中启动了一个干净的 Ubuntu 16.04,并尝试执行相同的操作。
- 安装php5.6、php5.6-curl。
- 删除 curl 然后手动构建
- 再次安装php5.6-curl
一切都进展顺利。当我在云 Ubuntu 上执行 apt-cache search php5.6 时,扩展列表变得更大。
答案1
它似乎没有ondrej
适用于 16.10 的 ppa,所以你找不到它。将你的 ppa 存储库从 16.10 (yakkety?) 更改为 16.04 (xenial),你就会找到 php5.6-curl... 或升级到 17.04。
注意:现在尚不清楚这是否可以在您的版本操作系统上运行...我只是指出了您请求的文件/版本。