Fixing SyntaxError while installing nginx using nginxinstaller
by rajesh[ Edit ] 2012-04-11 19:28:22
If you get the following error while installing nginx using nginxinstaller, the fix might be in upgrading python
Traceback (most recent call last):
File "/scripts/createvhosts.py", line 2, in ?
import yaml
File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause
Installing WHM interface...
deploying booster rockets
Traceback (most recent call last):
File "/usr/local/src/publicnginx/nginxinstaller2", line 9, in ?
import createvhosts
File "/usr/local/src/publicnginx/createvhosts.py", line 2, in ?
import yaml
File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' claus
Python can not be upgraded using yum.
So download latest 2.* version of python manually from http://www.python.org/getit/
and install it.
After that run nginxinstaller