I'm trying to install the latest patch on Magento 1.7.0.2 running on a centOS nginx server. I've installed it on the dev server via SSH and all worked smoothly. However the live server which is nginx I'm getting this error:
[root#### htdocs]# sh PATCH_SUPEE-5345_CE_1.7.0.2_v1.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Admin/Model/Observer.php
Hunk #1 FAILED at 44.
Hunk #2 FAILED at 58.
Hunk #3 FAILED at 69.
3 out of 3 hunks FAILED -- saving rejects to file app/code/core/Mage/Admin/Model/Observer.php.rej
patching file app/code/core/Mage/Core/Controller/Request/Http.php
Hunk #1 FAILED at 76.
Hunk #2 FAILED at 530.
2 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Core/Controller/Request/Http.php.rej
patching file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php
Hunk #1 FAILED at 55.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php.rej
patching file lib/Varien/Db/Adapter/Pdo/Mysql.php
Hunk #1 FAILED at 2672.
1 out of 1 hunk FAILED -- saving rejects to file lib/Varien/Db/Adapter/Pdo/Mysql.php.rej
From what I've seen this is due to line endings, but I've double checked these and they are Unix. Has anyone come across this before is it something to do with nginx? Any advise would be great!
Thanks
I have run into this issue on a couple of patches. My solution was to just grab the files from a fresh copy of Magento, replace the modified files, and then apply the patch.
This should work fine so long as the modifications to those files are trivial (such as line ending issues). You should verify that there haven't been actual changes to the functionality of those core files.
Alternatively, you can find the already patched files here:
http://magentary.com/kb/apply-supee-5344-and-supee-1533-without-ssh/
You could just upload those over FTP. Personally I think it is better to use the shell patch as it is easy to roll back if something goes wrong.
Related
After the new version for python-crontab (2.7.0) got uploaded yesterday, my pipeline builds started to fail because there was a new hash for the same old pinned version (2.6.0). Local builds fail too with no code changes on my end. Simply updating the lockfile does resolve this but I thought the purpose of the hashes was to certify authenticity of the packages you are getting matches a previous version aka prevent binary distrubition/supply-chain hijacking using signatures.
#0 18.96 [pipenv.exceptions.InstallError]: Using cached python_crontab-2.6.0-py3-none-any.whl (25 kB)
#0 18.96 [pipenv.exceptions.InstallError]: ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
#0 18.96 [pipenv.exceptions.InstallError]: python-crontab==2.6.0 from https://files.pythonhosted.org/packages/8a/65/ee4f4db956d14b42aa6cf0dbd0b77217a206484b99f1d4aa11326cd3952a/python_crontab-2.6.0-py3-none-any.whl (from -r /tmp/pipenv-om9jbtdi-requirements/pipenv-0ytg305b-hashed-reqs.txt (line 80)):
#0 18.96 [pipenv.exceptions.InstallError]: Expected sha256 1e35ed7a3cdc3100545b43e196d34754e6551e7f95e4caebbe0e1c0ca41c2f1b
#0 18.96 [pipenv.exceptions.InstallError]: Got f308a64b8b1d072da4a235e9320398a242e92d080c1d8143bd0c600b24e160f8
#0 18.96 ERROR: Couldn't install package: [omitted for length]
Looking at wheel hash:
https://pypi.org/project/python-crontab/2.6.0/#copy-hash-modal-556e5941-9a7b-49bb-8d72-bd7d824f8614 f308a64b8b1d072da4a235e9320398a242e92d080c1d8143bd0c600b24e160f8
vs tar.gz hash:
https://pypi.org/project/python-crontab/2.6.0/#copy-hash-modal-811f8508-00b8-4437-9256-13cdb7f532df 1e35ed7a3cdc3100545b43e196d34754e6551e7f95e4caebbe0e1c0ca41c2f1b
What am I missing?
Error msg with my pipeline command -- this has worked for years.
------
failed to solve: executor failed running [/bin/sh -c pipenv install --dev --system --deploy]: exit code: 1
Exited with code exit status 17
My lockfile:
"python-crontab": {
"hashes": [
"sha256:1e35ed7a3cdc3100545b43e196d34754e6551e7f95e4caebbe0e1c0ca41c2f1b"
],
"index": "pypi",
"version": "==2.6.0"
},
I'm trying to install a software named "pigz" on mac . after downloading the source code, in terminal I go to the folder containing source code then I run make. when I try to install it with sudo make install I get this message
make: *** No rule to make target `install'. Stop.
or when I try to install it with brew
brew install pigz
I get this error
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/pigz-2.4.catalina.bottle.ta
Warning: Transient problem: timeout Will retry in 1 seconds. 3 retries left.
Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left.
Warning: Transient problem: timeout Will retry in 4 seconds. 1 retries left.
##O=# #
curl: (6) Could not resolve host: homebrew.bintray.com
Error: Failed to download resource "pigz"
Download failed: https://homebrew.bintray.com/bottles/pigz-2.4.catalina.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://zlib.net/pigz/pigz-2.4.tar.gz
######################################################################## 100.0%
==> make CC=clang CFLAGS=
🍺 /usr/local/Cellar/pigz/2.4: 7 files, 154KB, built in 4 seconds
since I'm very new to command line I really don't know what this means and what I should do
I would appreciate your help
In the source code that you're looking at, there is a Makefile. When you run the command make, it executes the first default rule that it sees within that file.
When you run the command sudo make install, it looks inside of the Makefile and looks for the install rule. However, if you look at the Makefile of the software you're looking at, there is no install rule, hence the reason you get the error message:
make: *** No rule to make target `install'. Stop.
This is simply because there is no rule to install anything, so when you run that command, it simply will not do anything.
You can get a better understanding of this stuff by searching online about what Makefiles are, you'll find a bunch of resources. This can be a good starting point.
My current boost package is libboost-all-dev(default version 1.58.0.1) which is very old for my current need. So I tried -
sudo apt-get install libboost1.74 libboost1.74-dev
It showed me error of somekind -
libboost1.74 is already the newest version (1.74-0~16~ubuntu16.04.1).
The following NEW packages will be installed:
libboost1.74-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/9,325 kB of archives.
After this operation, 139 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 393826 files and directories currently installed.)
Preparing to unpack .../libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb ...
Unpacking libboost1.74-dev (1.74-0~16~ubuntu16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb (--unpack):
trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev:amd64 1.58.0+dfsg-5ubuntu3.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
However I tried several times before to manually install boost libraries. They does not seem to work though so I deleted them manually. Is this problem related to my manual deletion process? Or maybe I am doing something wrong?
The message makes it clear that you need to uninstall 1.58 first:
trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev
I followed this guide on how to install telegram-cli with Cygwin, but when I attempted the step "We need to patch Makefile and loop.c to compile in cygwin. Download this patch then untar. Then, patch in tg directory." and tried to patch using the provided code
patch -p1 < telegram-cli-cygwin.patch
I got the following message:
$ patch -p1 < telegram-cli-cygwin.patch
patching file Makefile
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file loop.c
Hunk #1 FAILED at 383.
Hunk #2 FAILED at 634.
2 out of 2 hunks FAILED -- saving rejects to file loop.c.rej
Everything was working fine up until then. Any help would be appreciated.
The source does not matches with the version for which the patch was prepared.
Likely it is a following version.
Look on Makefile.rej and loop.c.rej and check the discrepancy.
May be the change were alredy implemented or the context changes do not allow
the patch program to recognize where to implement the changes.
I have this patch in Magento which is patch.sh and I want to run this file and execute it. I logged in and tried to install using SSH way. I'm using PUTTY. When I run the patch.sh file I encountered an error, and I don't know how to fix it. Here is the error message:
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Admin/Model/Observer.php
Hunk #1 FAILED at 44.
Hunk #2 FAILED at 62.
Hunk #3 FAILED at 73.
3 out of 3 hunks FAILED -- saving rejects to file app/code/core/Mage/Admin/Model/Observer.php.rej
patching file app/code/core/Mage/Core/Controller/Request/Http.php
Hunk #1 FAILED at 76.
Hunk #2 FAILED at 541.
2 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Core/Controller/Request/Http.php.rej
patching file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php
Hunk #1 FAILED at 55.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php.rej
patching file app/code/core/Mage/XmlConnect/Model/Observer.php
Hunk #1 FAILED at 143.
Hunk #2 FAILED at 160.
2 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/XmlConnect/Model/Observer.php.rej
patching file lib/Varien/Db/Adapter/Pdo/Mysql.php
Hunk #1 FAILED at 2834.
1 out of 1 hunk FAILED -- saving rejects to file lib/Varien/Db/Adapter/Pdo/Mysql.php.rej
How should I fix it or where should I start to debug the problem?
Either your Magento installation is already patched, or you have modifications in core files (app/code/core/Mage/Admin/Model/Observer.php for example and so on).
The solution is to compare your current files with original files from Magento distribution and understand why your files got changed.
If you believe there should be no any changes in core files, you can simply replace app/code/core/Mage/Admin/Model/Observer.php, app/code/core/Mage/Core/Controller/Request/Http.php and so on with original files from corresponding Magento distribution and re-run the patch.
Try on your /var/www magento root
rm -rf var/cache var/session
chmod 550 ./mage
./mage mage-setup .