无法在 Windows 7 上安装 PEAR,结构/图形错误 [英] Can't install PEAR on Windows 7, Structures/Graph error

查看:20
本文介绍了无法在 Windows 7 上安装 PEAR,结构/图形错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成了 Windows 7 的全新安装.我已经安装了 Apache、Mysql和 PHP 5.3.5 全部分开(不使用 XAMPP/其他).

I just did a clean install of Windows 7. I've installed Apache, Mysql and PHP 5.3.5 all separated (not using XAMPP/others).

我在安装过程中遇到以下错误:错误:无法解压缩 phar://C:/Web/php-5.3.5/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.2.tar

I'm getting the following error in the install: ERROR: unable to unpack phar://C:/Web/php-5.3.5/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.2.tar

完整的堆栈跟踪是:

C:Webphp-5.3.5>go-pear.bat

Are you installing a system-wide PEAR or a local copy?
(system|local) [system] : system

Below is a suggested file layout for your new PEAR installation.  To change individual locations, type the number in front of the directory.  Type 'all' to change all of them or simply press Enter to accept these locations.

 1. Installation base ($prefix)                   : C:Webphp-5.3.5
 2. Temporary directory for processing            : C:Webphp-5.3.5	mp
 3. Temporary directory for downloads             : C:Webphp-5.3.5	mp
 4. Binaries directory                            : C:Webphp-5.3.5
 5. PHP code directory ($php_dir)                 : C:Webphp-5.3.5pear
 6. Documentation directory                       : C:Webphp-5.3.5docs
 7. Data directory                                : C:Webphp-5.3.5data
 8. User-modifiable configuration files directory : C:Webphp-5.3.5cfg
 9. Public Web Files directory                    : C:Webphp-5.3.5www
10. Tests directory                               : C:Webphp-5.3.5	ests
11. Name of configuration file                    : C:Webphp-5.3.5pear.ini
12. Path to CLI php.exe                           : C:Webphp-5.3.5

1-12, 'all' or Enter to continue:
Beginning install...
Configuration written to C:Webphp-5.3.5pear.ini...
Initialized registry...
Preparing to install...
installing phar://C:/Web/php-5.3.5/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.3.tar...
installing phar://C:/Web/php-5.3.5/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.2.3.tar...
installing phar://C:/Web/php-5.3.5/PEAR/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.8.0.tar...
installing phar://C:/Web/php-5.3.5/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.2.tar...
installing phar://C:/Web/php-5.3.5/PEAR/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1.tar...
install ok: channel://pear.php.net/Archive_Tar-1.3.3
install ok: channel://pear.php.net/Console_Getopt-1.2.3
ERROR: unable to unpack phar://C:/Web/php-5.3.5/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.2.tar
install ok: channel://pear.php.net/XML_Util-1.2.1
install ok: channel://pear.php.net/PEAR-1.8.0
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's' PHP-GTK2-based installer)

PEAR: To install optional features use "pear install pear/PEAR#featurename"

** WARNING! Old version found at C:Webphp-5.3.5, please remove it or be sure t
o use the new c:webphp-5.3.5pear.bat command

The 'pear' command is now at your service at c:webphp-5.3.5pear.bat

* WINDOWS ENVIRONMENT VARIABLES *
For convenience, a REG file is available under C:Webphp-5.3.5PEAR_ENV.reg .
This file creates ENV variables for the current user.

Double-click this file to add it to the current user registry.

C:Webphp-5.3.5>

推荐答案

经过几天的谷歌搜索,我找到了答案.就这个.如何解决:

After days of googling I've found an answer. Here is it. How to solve:

具有管理员权限(以管理员权限启动cmd):

With admin permission (start cmd with admin privileges):

  1. 运行默认 PHP 安装附带的 go-pear.bat.它会安装 PEAR,但在安装 Structures_Graph 时会产生错误.IMO Pear 需要这个包来生成包依赖关系(图),因为它缺少它不允许我们安装或升级任何其他包.

  1. Run the go-pear.bat that comes with the default PHP installation. It'll installs PEAR, but it's going to generate an error when installing Structures_Graph. IMO Pear needs this package to generate the package dependency (graph), since it's missing it not allow us to install or upgrade any other package.

从 pear.php.net 网站下载并解压缩 Structures_Graph (直接链接).然后将 Structure 文件夹复制到 PEAR 文件夹中.存档包含三个文件夹:docs、Structures、tests.我们只需要结构之一.将 Structures 文件夹复制到您的 PHP_ROOT_DIRECTORYPEAR 目录.因此,如果您在 C:Webphp-5.3.5 上安装 PHP,请将 Structures 文件夹复制到 C:Webphp-5.3.5PEAR,结果应该是:C:Webphp-5.3.5PEARStructures

Download and uncompress Structures_Graph from the pear.php.net website (direct link). Then copy the Structure folder into the PEAR folder. The archive has three folders: docs, Structures, tests. We only need the Structures one. Copy the Structures folder to your PHP_ROOT_DIRECTORYPEAR directory. So if you installed PHP on C:Webphp-5.3.5 copy the Structures folder to C:Webphp-5.3.5PEAR, the result should be: C:Webphp-5.3.5PEARStructures

执行 pear install Structures_Graph.即使文件存在,Structures_Graph 并没有真正安装(我们在安装过程中遇到了问题).所以我们需要运行上面的命令.

Do pear install Structures_Graph. Even though the files are present, Structures_Graph is not really installed (we had a problem during installation). So we need to run the command above.

pear 升级PEAR.这会将 PEAR 本身升级到当前版本.

Do pear upgrade PEAR. This upgrades PEAR itself to the current version.

执行 pear 升级 Console_Getopt.这会将 Console_Getopt 升级到当前版本,现在我们可以管理和安装任何 pear 包.

Do pear upgrade Console_Getopt. This upgrades Console_Getopt to the current version and now we can manage and install any pear package.

这篇关于无法在 Windows 7 上安装 PEAR,结构/图形错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆