【问题标题】:Cannot install PEAR mail package XAMPP on Windows无法在 Windows 上安装 PEAR 邮件包 XAMPP
【发布时间】:2017-01-30 07:00:29
【问题描述】:

从命令行:

C:\Users\Lemur>pear install --onlyreqdeps Mail

Did not download optional dependencies: pear/Net_SMTP, use --alldeps to download automatically
pear/Mail can optionally use package "pear/Net_SMTP" (version >= 1.4.1)
downloading Mail-1.3.0.tgz ...
Starting to download Mail-1.3.0.tgz (23,110 bytes)
........done: 23,110 bytes
ERROR: failed to mkdir C:\php\pear\tests\Mail\tests

我在 xampp\php\pear\Mail 中看到一个新创建的 Mail 文件夹,这是正确的,但该文件夹没有内容。

此外,错误表明安装正在尝试将某些内容放在 C:\php\pear\tests\Mail\tests。没有这样的目录C:\php\pear...

怎么了? php.ini 中的 include_path 正确 (C:\xampp\php\pear)。
提前致谢。

【问题讨论】:

  • 使用不同的方法,我试过: php pyrus.phar install Mail-1.3.0 only to have the system come back with Pyrus\XMLParser\Exception: Invalid XML document Pyrus\XMLParser\Exception: Line 2:元素'{pear2.php.net/dtd/customcommand-2.0}commands',属性'version':值'(null)'与固定值约束'2.0'不匹配。

标签: windows email installation xampp package


【解决方案1】:

在这里找到答案:http://davehiren.blogspot.com/2011/04/how-to-install-or-uninstall-pear.html。我正在使用 XAMPP,并没有意识到需要更改的所有路径变量。一旦我改变了所有的路径变量,Mail 包就安装好了。

【讨论】:

    【解决方案2】:

    要在 Windows 中使用 XAMPP 处理 PEAR,请务必避免在 Windows 中使用命令行,而应使用 XAMPP Shell。只需打开 XAMPP 控制面板,然后单击右侧的 XAMPP Shell:

    在 XAMPP Shell 中,您可以像往常一样输入 PEAR 包安装命令,这些包将安装在 XAMPP 的 PHP 目录中的适当位置:

    pear install --onlyreqdeps Mail

    【讨论】:

    • 在此过程中出现此错误,请帮助。 “PHP 致命错误:无法在 F:\xampp\php\pear\Archive\Tar.php 的第 639 行的写入上下文中使用内置函数的结果 致命错误:无法在 F 的写入上下文中使用内置函数的结果:\xampp\php\pear\Archive\Tar.php 在第 639 行"
    • @HarishKumar 我也遇到了这个问题并使用了solution here
    猜你喜欢
    • 2011-07-06
    • 2014-03-12
    • 1970-01-01
    • 2023-02-10
    • 2013-09-20
    • 1970-01-01
    • 2012-02-29
    • 1970-01-01
    • 2013-02-12
    相关资源
    最近更新 更多