0

When trying to apply a patch I am getting this error-

 ssh PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh
ssh: Could not resolve hostname PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11- 
6-06.sh: Name or service not known

When I do ls I can see the patch. I have double and triple checked it is spell correct, and I have all permissions. What does name or service not known mean?

7ochem
  • 7,532
  • 14
  • 51
  • 80
tjjen
  • 883
  • 1
  • 12
  • 35

2 Answers2

1

The command is bash, not ssh. So in the end:

bash PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh

Ref: https://support.hypernode.com/knowledgebase/how-to-apply-magento-patches/#Step_4_Apply_the_patch

PY Yick
  • 2,705
  • 1
  • 17
  • 35
  • When I ran it with bash (which seems correct, thank you) I now get this-PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh: line 7: $'\r': command not found PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh: line 9: syntax error near unexpected token $'{\r'' 'ATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh: line 9:_check_installed_tools() { – tjjen Jul 26 '17 at 03:05
  • Did you read this? https://magento.stackexchange.com/questions/176871/security-patch-supee-9767-possible-issues – PY Yick Jul 26 '17 at 03:08
  • Yup, I have ran and tested this on my dev server and gone through and created all the new files that require formkeys. I had no issues. – tjjen Jul 26 '17 at 03:11
  • You can check if the patches are installed successfully before (not 9767) by grep "|" app/etc/applied.patches.list – PY Yick Jul 26 '17 at 03:14
  • They were. Here is what I think my issue might be- https://stackoverflow.com/questions/21465771/magento-patch-failing-to-install This sounds like what I am dealing with. I downloaded in chrome on a mac. So I opened it with Sublime just now and and under view-line endings-unix made sure that was checked and not windows. Still no good. – tjjen Jul 26 '17 at 03:19
  • also need to check https://magento.stackexchange.com/questions/184351/magento-upgrade-to-1-9-3-4-is-forms-working-without-form-key-output-in-templat/186028#186028 – Rama Chandran M Jul 26 '17 at 03:32
  • I don't know if this works: Zip the SH file, upload to remote server then unzip it, and run the SH file after that. – PY Yick Jul 26 '17 at 03:37
1

As stated you are using the wrong command. 'SSH' is a command for starting new ssh sessions with a remote host.

e.g.

ssh username@192.168.0.10

'Could not resolve hostname' and 'Name or service not known' errors are just stating that there is no host responding to this command as there is no host with the name of your patch.

'SH' is what i have used to run these commands. Use either of the below to run patches and they should run successfully (i normally run ssh terminals in bin/sh shell):

sh PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh

or

./PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh

Also see here for more information from Magento Dev Docs on applying patches:

http://devdocs.magento.com/guides/m1x/other/ht_install-patches.html

harri
  • 5,465
  • 6
  • 44
  • 100