我正在使用Vagrant和Puppet来设置虚拟机。我遇到了从Pear安装PHP CodeSniffer的问题。我看到的错误是:
==> default: err: /Stage[main]//Package[pear.php.net/PHP_CodeSniffer]/ensure: change from absent to present failed: Execution of '/usr/bin/pear upgrade -a pear.php.net/PHP_CodeSniffer' returned 1: Failed loading /usr/lib/php5/20090626+lfs/xdebug.so: /usr/lib/php5/20090626+lfs/xdebug.so: cannot open shared object file: No such file or directory
==> default: downloading PHP_CodeSniffer-2.3.4.tgz ...
==> default: Starting to download PHP_CodeSniffer-2.3.4.tgz (473,411 bytes)
==> default: ................................................................................................done: 473,411 bytes
==> default: could not extract the package.xml file from "/build/php5-q1fasi/php5-5.3.10/pear-build-download/PHP_CodeSniffer-2.3.4.tgz"
==> default: Download of "pear/PHP_CodeSniffer" succeeded, but it is not a valid package archive
==> default: Error: cannot download "pear/PHP_CodeSniffer"
==> default: Download failed
==> default: upgrade failed
==> default:
==> default: notice: /Stage[main]//Vcsrepo[/usr/share/php/PHP/CodeSniffer/Standards/WordPress]: Dependency Package[pear.php.net/PHP_CodeSniffer] has failures: true
==> default: warning: /Stage[main]//Vcsrepo[/usr/share/php/PHP/CodeSniffer/Standards/WordPress]: Skipping because of failed dependencies
我也无法手动安装软件包并看到相同的错误。这似乎与已经报告的问题有关Ubuntu can have problems unpackaging tgz
files。
我的Puppet文件的相关部分如下所示:
# Install PHP_CodeSniffer and the WordPress coding standard
package { 'pear.php.net/PHP_CodeSniffer':
ensure => 'installed',
provider => 'pear',
}
任何人对如何申请非压缩版本有什么想法?解决这个问题的任何其他建议都非常赞赏。
答案 0 :(得分:0)
我猜你在PHP中缺少zip
或zlib
个扩展程序。