brysontyrrell / PatchServer

A self-hosted implementation of an external patch source for Jamf Pro 10.2+
http://patchserver.readthedocs.io/en/latest/
MIT License
67 stars 13 forks source link

Ubuntu script fails to set env #13

Closed TravellingTechGuy closed 6 years ago

TravellingTechGuy commented 6 years ago

Getting error when running the script. Tried running as individual commands and it fails at: /usr/bin/virtualenv -p python2.7 -q /usr/local/patchserver-venv

Ubuntu 16.04 using http://patchserver.readthedocs.io/en/latest/setup/ubuntu.html

sudo /usr/bin/virtualenv -p python2.7 -q /usr/local/patchserver-venv Not overwriting existing python script /usr/local/patchserver-venv/bin/python (you must use /usr/local/patchserver-venv/bin/python2.7) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in main() File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main symlink=options.symlink) File "/usr/lib/python3/dist-packages/virtualenv.py", line 988, in create_environment download=download, File "/usr/lib/python3/dist-packages/virtualenv.py", line 918, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "/usr/lib/python3/dist-packages/virtualenv.py", line 812, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /usr/local/patchserver-venv/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 1

TravellingTechGuy commented 6 years ago

Fixed by setting locale in Ubuntu.

export LC_ALL="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8"