Magento修补程序无法安装 [英] Magento patch failing to install

查看:157
本文介绍了Magento修补程序无法安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://www.magentocommerce.com/download ,运行脚本使用 sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh 我们收到此错误:

When downloading and running the Magento PHP 5.4 support patch (Magento-CE-v1.7.0.0-1.7.0.2) from http://www.magentocommerce.com/download, running the script using sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh we receive this error:

$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
: command not found_1.12.0.0_v1.sh: line 7:
'ATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: line 9: syntax error near unexpected token `{
'ATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: line 9: `_check_installed_tools() {

奇怪的是,脚本的第7行是空白的(这里是文件的头): p>

Strangely, line 7 of the script is blank (here's the head of the file):

#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.

# 1. Check required system tools
_check_installed_tools() {
    local missed=""

我们尝试在Windows和Mac中,在Firefox和Chrome中下载,以排除由下载过程引起的任何编码问题。补丁似乎是非常新的 - 2014年1月17日添加

We tried the download in Windows and Mac, in Firefox and Chrome to rule out any encoding problems caused by the download process. The patch seems to be very new - Added Jan 17, 2014

我们正在运行Magento社区版1.7。 0.2

We're running Magento Community Edition 1.7.0.2

修改

我们尝试使用 bash ,但收到相同的回复。

We've tried running the .sh file with bash as well but receive the same response.

有趣的是,当点击下载时,Magento显示.sh源在浏览器中,我们尝试了各种各样的view-source的组合,然后保存;从浏览器窗口复制文本并将其保存到文本文件。这些都没有解决问题,尽管更改了错误消息:

Interestingly when the click "download", Magento shows the .sh source in the browser so we tried various combinations of view-source then save; copying the text from the browser window and saving it to a text file. None of these solved the problem although one changed the error message to:

$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
Checking if patch can be applied/reverted successfully...
/usr/bin/patch: **** malformed patch at line 238:

ERROR: Patch can't be applied/reverted successfully.

第238行是空白的注释行:

Line 238 is the blank comment line here:

+/**
+ * Abstract helper class for {@link Zend_Pdf_FileParser} that provides the
+ * data source for parsing.
+ *
+ * Concrete subclasses allow for parsing of in-memory, filesystem, and other
+ * sources through a common API. These subclasses also take care of error
+ * handling and other mundane tasks.

我们还尝试了这里提到的VI步骤:set ff unix
http://www.magentocommerce.com/boards/viewthread/864518

We also tried the VI step mentioned here - :set ff unix http://www.magentocommerce.com/boards/viewthread/864518

然后将错误更改为:

$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Catalog/Model/Product.php
Hunk #1 FAILED at 1936.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Catalog/Model/Product.php.rej
patching file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
Hunk #1 FAILED at 43.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php.rej
patching file app/code/core/Mage/Install/etc/config.xml
patching file app/code/core/Zend/Pdf/FileParserDataSource.php


推荐答案

事实证明,当补丁文件(不是要修补的文件)具有行尾时,会给出此错误这与您正在运行的系统不匹配。

It turns out that this error is given when the patch file (not the file being patched) has line endings which do not match the system on which it is being run.

例如:您将在以下情况下看到此错误:

eg: You will see this error when:


  • 您正在Linux上运行

  • 您的修补程序文件具有Windows行结尾

I chan ged补丁文件让Unix行结束使用Sublime:

I changed the patch file to have Unix line endings using Sublime:

查看>线端>> Unix

另请参见错误补丁Magento 1.7.1 Hunk#1 Failed at

这篇关于Magento修补程序无法安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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