无法在 Windows 7 上安装 PEAR,结构/图形错误

发布于 2024-10-12 08:03:08 字数 3208 浏览 1 评论 0 原文

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

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

完整的堆栈跟踪是:

C:\Web\php-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:\Web\php-5.3.5
 2. Temporary directory for processing            : C:\Web\php-5.3.5\tmp
 3. Temporary directory for downloads             : C:\Web\php-5.3.5\tmp
 4. Binaries directory                            : C:\Web\php-5.3.5
 5. PHP code directory ($php_dir)                 : C:\Web\php-5.3.5\pear
 6. Documentation directory                       : C:\Web\php-5.3.5\docs
 7. Data directory                                : C:\Web\php-5.3.5\data
 8. User-modifiable configuration files directory : C:\Web\php-5.3.5\cfg
 9. Public Web Files directory                    : C:\Web\php-5.3.5\www
10. Tests directory                               : C:\Web\php-5.3.5\tests
11. Name of configuration file                    : C:\Web\php-5.3.5\pear.ini
12. Path to CLI php.exe                           : C:\Web\php-5.3.5

1-12, 'all' or Enter to continue:
Beginning install...
Configuration written to C:\Web\php-5.3.5\pear.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:\Web\php-5.3.5, please remove it or be sure t
o use the new c:\web\php-5.3.5\pear.bat command

The 'pear' command is now at your service at c:\web\php-5.3.5\pear.bat

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

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

C:\Web\php-5.3.5>

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).

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

The full stack trace is:

C:\Web\php-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:\Web\php-5.3.5
 2. Temporary directory for processing            : C:\Web\php-5.3.5\tmp
 3. Temporary directory for downloads             : C:\Web\php-5.3.5\tmp
 4. Binaries directory                            : C:\Web\php-5.3.5
 5. PHP code directory ($php_dir)                 : C:\Web\php-5.3.5\pear
 6. Documentation directory                       : C:\Web\php-5.3.5\docs
 7. Data directory                                : C:\Web\php-5.3.5\data
 8. User-modifiable configuration files directory : C:\Web\php-5.3.5\cfg
 9. Public Web Files directory                    : C:\Web\php-5.3.5\www
10. Tests directory                               : C:\Web\php-5.3.5\tests
11. Name of configuration file                    : C:\Web\php-5.3.5\pear.ini
12. Path to CLI php.exe                           : C:\Web\php-5.3.5

1-12, 'all' or Enter to continue:
Beginning install...
Configuration written to C:\Web\php-5.3.5\pear.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:\Web\php-5.3.5, please remove it or be sure t
o use the new c:\web\php-5.3.5\pear.bat command

The 'pear' command is now at your service at c:\web\php-5.3.5\pear.bat

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

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

C:\Web\php-5.3.5>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

半夏半凉 2024-10-19 08:03:08

经过几天的谷歌搜索,我找到了答案。就是这样。 如何解决

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

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

  2. 从 pear.php.net 网站 (Structures_Graph rel="noreferrer">直接链接)。然后将 Structure 文件夹复制到 PEAR 文件夹中。该存档包含三个文件夹:docs、Structures、tests。我们只需要结构之一。将 Structures 文件夹复制到您的 PHP_ROOT_DIRECTORY\PEAR 目录。因此,如果您将 PHP 安装在 C:\Web\php-5.3.5 上,请将 Structures 文件夹复制到 C:\Web\php-5.3.5\PEAR \,结果应该是: C:\Web\php-5.3.5\PEAR\Structures

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

  4. 执行pear 升级PEAR。这会将 PEAR 本身升级到当前版本。

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

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

With admin permission (start cmd with admin privileges):

  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.

  2. 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_DIRECTORY\PEAR directory. So if you installed PHP on C:\Web\php-5.3.5 copy the Structures folder to C:\Web\php-5.3.5\PEAR\, the result should be: C:\Web\php-5.3.5\PEAR\Structures

  3. 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.

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

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

葬花如无物 2024-10-19 08:03:08

Marcos Roriz 解决方案确实有效,但要澄清第 2 点:

未压缩的“Structures”文件夹(在 tgz 内)需要放置在文件夹内:“PEAR\pear”->例如 C:\wamp\bin\php\php5.3.5\PEAR\pear

Marcos Roriz solution does indeed work, but to clarify point 2:

The uncompressed "Structures" folder (inside the tgz) needs to be placed inside the folder: "PEAR\pear" -> e.g. C:\wamp\bin\php\php5.3.5\PEAR\pear

寄居者 2024-10-19 08:03:08

这是您需要做的事情和一些新调整的组合。使用 WAMP (Wampserver 2.2.1) 在 WinXP Pro 上工作

更改您的 go-pear.bat 文件:

@ECHO OFF
set PHP_BIN=php.exe
%PHP_BIN% -d output_buffering=0 -d phar.require_hash=0 PEAR\go-pear.phar
pause

运行它 - go-pear.bat

现在您已经开始使用 Pear安装时缺少 graph.php

从 pear.php.net 网站下载并解压缩 Structures_Graph。将 Structure 文件夹复制到 PEAR 文件夹中,以便关键文件位于如下位置:

PEAR\Structures\Graph.php
PEAR\Structures\Graph\Node.php

在 Node.php 中更改此行:

require_once '/Structures/Graph.php';

在 PEAR 目录中执行:

pear upgrade=all

这对我来说是这样。

This is a combination of the things you need to do and a couple of new tweaks. Worked on WinXP Pro with WAMP (Wampserver 2.2.1)

Change your go-pear.bat file:

@ECHO OFF
set PHP_BIN=php.exe
%PHP_BIN% -d output_buffering=0 -d phar.require_hash=0 PEAR\go-pear.phar
pause

Run it - go-pear.bat

Now you've go a Pear install with a missing graph.php

Download and uncompress Structures_Graph from the pear.php.net website. Copy the Structure folder into the PEAR folder so that the key files are located as such:

PEAR\Structures\Graph.php
PEAR\Structures\Graph\Node.php

Change this line in Node.php:

require_once '/Structures/Graph.php';

Execute in the PEAR directory:

pear upgrade=all

That did it for me.

故乡的云 2024-10-19 08:03:08

首先,以管理员身份运行。

然后 - 尝试在控制台的目标目录中写入一些内容以隔离任何剩余的权限问题。

First of all, run as administrator.

Then - try to write something in target directory in the console to isolate any remaining permissions problems.

素食主义者 2024-10-19 08:03:08

升级 wampserver(现在附带 php 5.3.5)后,我遇到了很多问题。

我通过安装 php 5.3.0 并使用它来运行 http:// 中找到的安装程序解决了这个问题pear.php.net/go-pear。我将 php cli 设置设置为 php5.3.5 文件夹,没有任何问题。

这可能是 wampserver 特定的。为了判断您是否遇到类似的问题,这里是我遇到的一些问题:

使用与 php5.3.5 一起打包的 go-pear.bat 我遇到了与原始海报相同的无法解压错误。

使用与 php5.3.0 一起打包的 go-pear.bat 我能够完成安装,但 pear 安装程序是 v1.8.0

使用前面提到的 php5.3.5 的 pear 站点上的安装程序,出现错误“警告:rmdir(D :\temp): D:\go-pear.php 第 1237 行的目录不为空”。查看堆栈跟踪,Archive_Tar 类抛出错误,并且安装程序无法自行清理。

I've been having many issues after upgrading my wampserver which now comes with php 5.3.5.

I have solved the problem by installing php 5.3.0 alongside and using it to run the installer found at http://pear.php.net/go-pear. I set the php cli setting to the php5.3.5 folder without any issues.

This might be wampserver specific. To gauge if you are experiencing a similar problem here are some of the issues I encountered:

Using the go-pear.bat packaged with php5.3.5 i had the same unable to unpack error as the original poster.

Using the go-pear.bat packaged with php5.3.0 i was able to complete the installation but the pear installer was v1.8.0

Using the installer on the pear site mentioned previously with php5.3.5 i had an error "Warning: rmdir(D:\temp): Directory not empty in D:\go-pear.php on line 1237". Looking at the stack trace the Archive_Tar class was throwing an error and the installer was failing to clean up after itself.

雨落星ぅ辰 2024-10-19 08:03:08

Web 前端未写入 pear.ini 的正确路径
ig phph 设置为 magic_quotes_gpc = On
它将路径中的所有斜杠“\”加倍为“\”,这是一个错误吗?
例如,可以解压软件包(路径错误?)

安装软件包时出现“无法解压”消息

http://pear.php.net/bugs/bug.php?id=18212

the web frontend not write correct paths to pear.ini
ig phph setting is magic_quotes_gpc = On
its doubles all slashes "\" in paths to "\" is it a bug ?
Than the packages for example can be unpacked (wrong paths ?)

"unable to unpack" Message when installing packages

http://pear.php.net/bugs/bug.php?id=18212

梦里南柯 2024-10-19 08:03:08

我尝试了以上所有方法,但没有运气。下载并解压“Structures”文件夹后,我必须编辑所有路径并添加“PEAR/”。然后我可以执行“pear install Structures_Graph”,然后执行“pear Upgrade-all”

Graph.php

require_once 'PEAR/Structures/Graph/Node.php';

Node.php

require_once 'PEAR/Structures/Graph.php';

AcyclingTest.php

require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';

TopologicalSorter.php

require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';
require_once 'PEAR/Structures/Graph/Manipulator/AcyclicTest.php';

I tried all of the above with no luck. After downloading and extracting the "Structures" folder I had to edit all paths and add "PEAR/". Then I was able to do "pear install Structures_Graph" and then "pear upgrade-all"

Graph.php

require_once 'PEAR/Structures/Graph/Node.php';

Node.php

require_once 'PEAR/Structures/Graph.php';

AcyclicTest.php

require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';

TopologicalSorter.php

require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';
require_once 'PEAR/Structures/Graph/Manipulator/AcyclicTest.php';
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文