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).
我只是简单地安装了Windows 7。我已经安装了Apache、Mysql和PHP 5.3.5(不使用XAMPP/其他)。
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
我在安装过程中出现了以下错误:无法打开phar://C:/Web/php-5.3.5/PEAR/go- 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>
7 个解决方案
#1
41
After days of googling I've found an answer. Here is it. How to solve:
在谷歌上搜索了几天之后,我找到了一个答案。这是它。如何解决:
With admin permission (start cmd with admin privileges):
与管理员权限(启动cmd与管理员权限):
-
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 installingStructures_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.运行go-pear。使用默认PHP安装的bat。它将安装PEAR,但是在安装Structures_Graph时将会产生错误。IMO Pear需要这个包来生成包依赖关系(图),因为它丢失了它不允许我们安装或升级任何其他包。
-
Download and uncompress
Structures_Graph
from the pear.php.net website (direct link). Then copy theStructure
folder into the PEAR folder. The archive has three folders: docs, Structures, tests. We only need the Structures one. Copy the Structures folder to yourPHP_ROOT_DIRECTORY\PEAR
directory. So if you installed PHP onC:\Web\php-5.3.5
copy theStructures
folder toC:\Web\php-5.3.5\PEAR\
, the result should be:C:\Web\php-5.3.5\PEAR\Structures
从pear.php.net网站(direct link)下载并解压Structures_Graph。然后将结构文件夹复制到PEAR文件夹中。存档有三个文件夹:文档、结构、测试。我们只需要结构一。将结构文件夹复制到PHP_ROOT_DIRECTORY\PEAR目录。因此,如果您在C:\Web\ PHP -5.3.5中安装了PHP,将结构文件夹复制到C:\Web\ PHP -5.3.5\PEAR\,结果应该是:C:\Web\ PHP -5.3.5\PEAR\结构。
-
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.做梨Structures_Graph安装。即使文件存在,Structures_Graph也没有真正安装(我们在安装过程中遇到了问题)。因此,我们需要运行上面的命令。
-
Do
pear upgrade PEAR
. This upgrades PEAR itself to the current version.做梨梨升级。这个升级到现在的版本。
-
Do
pear upgrade Console_Getopt
. This upgrades Console_Getopt to the current version and now we can manage and install any pear package.做梨Console_Getopt升级。这将升级Console_Getopt到当前版本,现在我们可以管理和安装任何pear包。
#2
5
Marcos Roriz solution does indeed work, but to clarify point 2:
Marcos Roriz解决方案确实有效,但要澄清一点:
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
未压缩的“结构”文件夹(在tgz中)需要放在文件夹中:“PEAR\ PEAR”->,例如:\wamp\bin\php\php5.3.5\PEAR\ PEAR。
#3
4
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)
这是你需要做的事情和一些新的调整的组合。与WAMP (Wampserver 2.2.1)合作开发WinXP Pro
Change your go-pear.bat
file:
改变你的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
Run it - go-pear.bat
——go-pear.bat运行它
Now you've go a Pear install with a missing graph.php
现在,您已经使用缺少的graph.php进行了一个Pear安装。
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.php.net网站下载和解压Structures_Graph。将结构文件夹复制到PEAR文件夹中,以便将密钥文件定位为:
PEAR\Structures\Graph.php
PEAR\Structures\Graph\Node.php
Change this line in Node.php:
在Node.php中更改这一行。
require_once '/Structures/Graph.php';
Execute in the PEAR directory:
在PEAR目录中执行:
pear upgrade=all
That did it for me.
这是为了我。
#4
1
First of all, run as administrator.
首先,作为管理员运行。
Then - try to write something in target directory in the console to isolate any remaining permissions problems.
然后——尝试在控制台的目标目录中编写一些东西,以隔离任何剩余的权限问题。
#5
1
I've been having many issues after upgrading my wampserver which now comes with php 5.3.5.
升级我的wampserver后,我遇到了很多问题,现在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.
我已经通过安装php 5.3.0来解决这个问题,并使用它来运行在http://pear.php.net/go-pear中找到的安装程序。我将php cli设置设置为php5.3.5文件夹,没有任何问题。
This might be wampserver specific. To gauge if you are experiencing a similar problem here are some of the issues I encountered:
这可能是特定于wampserver的。为了判断你是否遇到了类似的问题,我遇到了一些问题:
Using the go-pear.bat packaged with php5.3.5 i had the same unable to unpack error as the original poster.
使用go-pear。使用php5.3.5的bat,我有同样的能力,不能像原来的海报一样打开错误。
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
使用go-pear。我可以完成安装,但是pear安装程序是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.
使用php5.3.5前面提到的pear站点上的安装程序,我有一个错误“警告:rmdir(D:\temp):目录不是空的D:\go-pear。php在第1237行”。查看堆栈跟踪时,Archive_Tar类正在抛出一个错误,而安装程序本身无法清理。
#6
1
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 ?)
web前端不会给pear写正确的路径。ini ig phph设置是magic_quotes_gpc =在它的双打中所有的斜杠“\”在路径到“\”是一个错误吗?例如,软件包可以打开(错误的路径?)
"unable to unpack" Message when installing packages
在安装包时“无法打开”消息。
http://pear.php.net/bugs/bug.php?id=18212
http://pear.php.net/bugs/bug.php?id=18212
#7
1
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"
我试了所有的方法都没有成功。下载并提取“结构”文件夹后,我必须编辑所有路径并添加“PEAR/”。然后我就可以做"pear安装Structures_Graph"然后"pear upgrade-all"
Graph.php
Graph.php
require_once 'PEAR/Structures/Graph/Node.php';
Node.php
Node.php
require_once 'PEAR/Structures/Graph.php';
AcyclicTest.php
AcyclicTest.php
require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';
TopologicalSorter.php
TopologicalSorter.php
require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';
require_once 'PEAR/Structures/Graph/Manipulator/AcyclicTest.php';
#1
41
After days of googling I've found an answer. Here is it. How to solve:
在谷歌上搜索了几天之后,我找到了一个答案。这是它。如何解决:
With admin permission (start cmd with admin privileges):
与管理员权限(启动cmd与管理员权限):
-
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 installingStructures_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.运行go-pear。使用默认PHP安装的bat。它将安装PEAR,但是在安装Structures_Graph时将会产生错误。IMO Pear需要这个包来生成包依赖关系(图),因为它丢失了它不允许我们安装或升级任何其他包。
-
Download and uncompress
Structures_Graph
from the pear.php.net website (direct link). Then copy theStructure
folder into the PEAR folder. The archive has three folders: docs, Structures, tests. We only need the Structures one. Copy the Structures folder to yourPHP_ROOT_DIRECTORY\PEAR
directory. So if you installed PHP onC:\Web\php-5.3.5
copy theStructures
folder toC:\Web\php-5.3.5\PEAR\
, the result should be:C:\Web\php-5.3.5\PEAR\Structures
从pear.php.net网站(direct link)下载并解压Structures_Graph。然后将结构文件夹复制到PEAR文件夹中。存档有三个文件夹:文档、结构、测试。我们只需要结构一。将结构文件夹复制到PHP_ROOT_DIRECTORY\PEAR目录。因此,如果您在C:\Web\ PHP -5.3.5中安装了PHP,将结构文件夹复制到C:\Web\ PHP -5.3.5\PEAR\,结果应该是:C:\Web\ PHP -5.3.5\PEAR\结构。
-
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.做梨Structures_Graph安装。即使文件存在,Structures_Graph也没有真正安装(我们在安装过程中遇到了问题)。因此,我们需要运行上面的命令。
-
Do
pear upgrade PEAR
. This upgrades PEAR itself to the current version.做梨梨升级。这个升级到现在的版本。
-
Do
pear upgrade Console_Getopt
. This upgrades Console_Getopt to the current version and now we can manage and install any pear package.做梨Console_Getopt升级。这将升级Console_Getopt到当前版本,现在我们可以管理和安装任何pear包。
#2
5
Marcos Roriz solution does indeed work, but to clarify point 2:
Marcos Roriz解决方案确实有效,但要澄清一点:
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
未压缩的“结构”文件夹(在tgz中)需要放在文件夹中:“PEAR\ PEAR”->,例如:\wamp\bin\php\php5.3.5\PEAR\ PEAR。
#3
4
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)
这是你需要做的事情和一些新的调整的组合。与WAMP (Wampserver 2.2.1)合作开发WinXP Pro
Change your go-pear.bat
file:
改变你的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
Run it - go-pear.bat
——go-pear.bat运行它
Now you've go a Pear install with a missing graph.php
现在,您已经使用缺少的graph.php进行了一个Pear安装。
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.php.net网站下载和解压Structures_Graph。将结构文件夹复制到PEAR文件夹中,以便将密钥文件定位为:
PEAR\Structures\Graph.php
PEAR\Structures\Graph\Node.php
Change this line in Node.php:
在Node.php中更改这一行。
require_once '/Structures/Graph.php';
Execute in the PEAR directory:
在PEAR目录中执行:
pear upgrade=all
That did it for me.
这是为了我。
#4
1
First of all, run as administrator.
首先,作为管理员运行。
Then - try to write something in target directory in the console to isolate any remaining permissions problems.
然后——尝试在控制台的目标目录中编写一些东西,以隔离任何剩余的权限问题。
#5
1
I've been having many issues after upgrading my wampserver which now comes with php 5.3.5.
升级我的wampserver后,我遇到了很多问题,现在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.
我已经通过安装php 5.3.0来解决这个问题,并使用它来运行在http://pear.php.net/go-pear中找到的安装程序。我将php cli设置设置为php5.3.5文件夹,没有任何问题。
This might be wampserver specific. To gauge if you are experiencing a similar problem here are some of the issues I encountered:
这可能是特定于wampserver的。为了判断你是否遇到了类似的问题,我遇到了一些问题:
Using the go-pear.bat packaged with php5.3.5 i had the same unable to unpack error as the original poster.
使用go-pear。使用php5.3.5的bat,我有同样的能力,不能像原来的海报一样打开错误。
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
使用go-pear。我可以完成安装,但是pear安装程序是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.
使用php5.3.5前面提到的pear站点上的安装程序,我有一个错误“警告:rmdir(D:\temp):目录不是空的D:\go-pear。php在第1237行”。查看堆栈跟踪时,Archive_Tar类正在抛出一个错误,而安装程序本身无法清理。
#6
1
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 ?)
web前端不会给pear写正确的路径。ini ig phph设置是magic_quotes_gpc =在它的双打中所有的斜杠“\”在路径到“\”是一个错误吗?例如,软件包可以打开(错误的路径?)
"unable to unpack" Message when installing packages
在安装包时“无法打开”消息。
http://pear.php.net/bugs/bug.php?id=18212
http://pear.php.net/bugs/bug.php?id=18212
#7
1
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"
我试了所有的方法都没有成功。下载并提取“结构”文件夹后,我必须编辑所有路径并添加“PEAR/”。然后我就可以做"pear安装Structures_Graph"然后"pear upgrade-all"
Graph.php
Graph.php
require_once 'PEAR/Structures/Graph/Node.php';
Node.php
Node.php
require_once 'PEAR/Structures/Graph.php';
AcyclicTest.php
AcyclicTest.php
require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';
TopologicalSorter.php
TopologicalSorter.php
require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';
require_once 'PEAR/Structures/Graph/Manipulator/AcyclicTest.php';