trailofbits / algo

Set up a personal VPN in the cloud
https://blog.trailofbits.com/2016/12/12/meet-algo-the-vpn-that-works/
GNU Affero General Public License v3.0
28.65k stars 2.31k forks source link

./algo: line 73: ansible-playbook: command not found #639

Closed bombitmd closed 7 years ago

bombitmd commented 7 years ago

OS / Environment

Amazon EC2

Ansible version

Version of components from requirements.txt

Summary of the problem

After installing, I tried running Algo

Steps to reproduce the behavior

Enter the number of your desired region:

Do you want macOS/iOS clients to enable "VPN On Demand" when connected to cellular networks?

Do you want macOS/iOS clients to enable "VPN On Demand" when connected to Wi-Fi?

Do you want to install a DNS resolver on this VPN server, to block ads while surfing?

Do you want each user to have their own account for SSH tunneling?

Do you want to apply operating system security enhancements on the server? (warning: replaces your sshd_config)

Do you want the VPN to support Windows 10 or Linux Desktop clients? (enables compatible ciphers and key exchange, less secure)

Do you want to retain the CA key? (required to add users in the future, but less secure)

./algo: line 73: ansible-playbook: command not found

The way of deployment (cloud or local)

cloud

Expected behavior

to run algo

Actual behavior

Full log

Enter the number of your desired region:

Do you want macOS/iOS clients to enable "VPN On Demand" when connected to cellular networks?

Do you want macOS/iOS clients to enable "VPN On Demand" when connected to Wi-Fi?

List the names of trusted Wi-Fi networks (if any) that macOS/iOS clients exclude from using the VPN (e.g., your home network. Comma-separated value, e.g., HomeNet,OfficeWifi,AlgoWiFi) : y

Do you want to install a DNS resolver on this VPN server, to block ads while surfing?

Do you want each user to have their own account for SSH tunneling?

Do you want to apply operating system security enhancements on the server? (warning: replaces your sshd_config)

Do you want the VPN to support Windows 10 or Linux Desktop clients? (enables compatible ciphers and key exchange, less secure)

Do you want to retain the CA key? (required to add users in the future, but less secure)

./algo: line 73: ansible-playbook: command not found

BUT, I think the problem also lies when I installed the dependencies:

<============= bombitmd@bmsss ~/Downloads/algo-master $ sudo python -m virtualenv env && source env/bin/activate && python -m pip install -U pip && python -m pip install -r requirements.txt Running virtualenv with interpreter /usr/bin/python2 New python executable in /media/Shared_Data/Downloads/algo-master/env/bin/python2 Not overwriting existing python script /media/Shared_Data/Downloads/algo-master/env/bin/python (you must use /media/Shared_Data/Downloads/algo-master/env/bin/python2) Installing setuptools, pkg_resources, pip, wheel...done. Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages Collecting msrestazure (from -r requirements.txt (line 1)) Using cached msrestazure-0.4.11-py2.py3-none-any.whl Requirement already satisfied: setuptools>=11.3 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 2)) Collecting ansible<2.2.1,>=2.1 (from -r requirements.txt (line 3)) Collecting dopy==0.3.5 (from -r requirements.txt (line 4)) Collecting boto>=2.5 (from -r requirements.txt (line 5)) Using cached boto-2.48.0-py2.py3-none-any.whl Collecting boto3 (from -r requirements.txt (line 6)) Using cached boto3-1.4.4-py2.py3-none-any.whl Collecting azure==2.0.0rc5 (from -r requirements.txt (line 7)) Using cached azure-2.0.0rc5-py2.py3-none-any.whl Collecting msrest==0.4.1 (from -r requirements.txt (line 8)) Using cached msrest-0.4.1-py2-none-any.whl Collecting apache-libcloud (from -r requirements.txt (line 9)) Using cached apache_libcloud-2.1.0-py2.py3-none-any.whl Collecting six (from -r requirements.txt (line 10)) Using cached six-1.10.0-py2.py3-none-any.whl Collecting pyopenssl (from -r requirements.txt (line 11)) Using cached pyOpenSSL-17.2.0-py2.py3-none-any.whl Collecting jinja2==2.8 (from -r requirements.txt (line 12)) Using cached Jinja2-2.8-py2.py3-none-any.whl Collecting keyring>=5.6 (from msrestazure->-r requirements.txt (line 1)) Using cached keyring-10.4.0-py2.py3-none-any.whl Collecting adal~=0.4.0 (from msrestazure->-r requirements.txt (line 1)) Collecting PyYAML (from ansible<2.2.1,>=2.1->-r requirements.txt (line 3)) Collecting paramiko (from ansible<2.2.1,>=2.1->-r requirements.txt (line 3)) Using cached paramiko-2.2.1-py2.py3-none-any.whl Collecting pycrypto>=2.6 (from ansible<2.2.1,>=2.1->-r requirements.txt (line 3)) Collecting requests>=1.0.4 (from dopy==0.3.5->-r requirements.txt (line 4)) Using cached requests-2.18.2-py2.py3-none-any.whl Collecting s3transfer<0.2.0,>=0.1.10 (from boto3->-r requirements.txt (line 6)) Using cached s3transfer-0.1.10-py2.py3-none-any.whl Collecting jmespath<1.0.0,>=0.7.1 (from boto3->-r requirements.txt (line 6)) Using cached jmespath-0.9.3-py2.py3-none-any.whl Collecting botocore<1.6.0,>=1.5.0 (from boto3->-r requirements.txt (line 6)) Using cached botocore-1.5.90-py2.py3-none-any.whl Collecting azure-batch==0.30.0rc5 (from azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_batch-0.30.0rc5-py2.py3-none-any.whl Collecting azure-servicemanagement-legacy==0.20.3 (from azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_servicemanagement_legacy-0.20.3-py2.py3-none-any.whl Collecting azure-graphrbac==0.30.0rc5 (from azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_graphrbac-0.30.0rc5-py2.py3-none-any.whl Collecting azure-storage==0.32.0 (from azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_storage-0.32.0-py2-none-any.whl Collecting azure-mgmt==0.30.0rc5 (from azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt-0.30.0rc5-py2.py3-none-any.whl Collecting azure-servicebus==0.20.2 (from azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_servicebus-0.20.2-py2.py3-none-any.whl Collecting certifi>=2015.9.6.2 (from msrest==0.4.1->-r requirements.txt (line 8)) Using cached certifi-2017.7.27.1-py2.py3-none-any.whl Collecting chardet>=2.3.0 (from msrest==0.4.1->-r requirements.txt (line 8)) Using cached chardet-3.0.4-py2.py3-none-any.whl Collecting requests-oauthlib>=0.5.0 (from msrest==0.4.1->-r requirements.txt (line 8)) Using cached requests_oauthlib-0.8.0-py2.py3-none-any.whl Collecting enum34>=1.0.4 (from msrest==0.4.1->-r requirements.txt (line 8)) Using cached enum34-1.1.6-py2-none-any.whl Collecting isodate>=0.5.4 (from msrest==0.4.1->-r requirements.txt (line 8)) Collecting cryptography>=1.9 (from pyopenssl->-r requirements.txt (line 11)) Using cached cryptography-2.0.2-cp27-cp27mu-manylinux1_x86_64.whl Collecting MarkupSafe (from jinja2==2.8->-r requirements.txt (line 12)) Collecting secretstorage; sys_platform == "linux2" or sys_platform == "linux" (from keyring>=5.6->msrestazure->-r requirements.txt (line 1)) Collecting python-dateutil>=2.1.0 (from adal~=0.4.0->msrestazure->-r requirements.txt (line 1)) Using cached python_dateutil-2.6.1-py2.py3-none-any.whl Collecting PyJWT>=1.0.0 (from adal~=0.4.0->msrestazure->-r requirements.txt (line 1)) Using cached PyJWT-1.5.2-py2.py3-none-any.whl Collecting pynacl>=1.0.1 (from paramiko->ansible<2.2.1,>=2.1->-r requirements.txt (line 3)) Using cached PyNaCl-1.1.2-cp27-cp27mu-manylinux1_x86_64.whl Collecting pyasn1>=0.1.7 (from paramiko->ansible<2.2.1,>=2.1->-r requirements.txt (line 3)) Using cached pyasn1-0.3.1-py2.py3-none-any.whl Collecting bcrypt>=3.1.3 (from paramiko->ansible<2.2.1,>=2.1->-r requirements.txt (line 3)) Using cached bcrypt-3.1.3-cp27-cp27mu-manylinux1_x86_64.whl Collecting idna<2.6,>=2.5 (from requests>=1.0.4->dopy==0.3.5->-r requirements.txt (line 4)) Using cached idna-2.5-py2.py3-none-any.whl Collecting urllib3<1.23,>=1.21.1 (from requests>=1.0.4->dopy==0.3.5->-r requirements.txt (line 4)) Using cached urllib3-1.22-py2.py3-none-any.whl Collecting futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" (from s3transfer<0.2.0,>=0.1.10->boto3->-r requirements.txt (line 6)) Using cached futures-3.1.1-py2-none-any.whl Collecting docutils>=0.10 (from botocore<1.6.0,>=1.5.0->boto3->-r requirements.txt (line 6)) Using cached docutils-0.13.1-py2-none-any.whl Collecting azure-common[autorest]==1.1.4 (from azure-batch==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_common-1.1.4-py2.py3-none-any.whl Collecting azure-nspkg (from azure-storage==0.32.0->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_nspkg-2.0.0-py2.py3-none-any.whl Collecting azure-mgmt-cdn==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_cdn-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-powerbiembedded==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_powerbiembedded-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-notificationhubs==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_notificationhubs-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-authorization==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_authorization-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-batch==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_batch-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-storage==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_storage-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-resource==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_resource-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-web==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_web-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-network==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_network-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-logic==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_logic-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-keyvault==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_keyvault-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-scheduler==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_scheduler-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-compute==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_compute-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-cognitiveservices==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_cognitiveservices-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-redis==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_redis-0.30.0rc5-py2.py3-none-any.whl Collecting azure-mgmt-commerce==0.30.0rc5 (from azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_commerce-0.30.0rc5-py2.py3-none-any.whl Collecting oauthlib>=0.6.2 (from requests-oauthlib>=0.5.0->msrest==0.4.1->-r requirements.txt (line 8)) Collecting ipaddress (from cryptography>=1.9->pyopenssl->-r requirements.txt (line 11)) Using cached ipaddress-1.0.18-py2-none-any.whl Collecting asn1crypto>=0.21.0 (from cryptography>=1.9->pyopenssl->-r requirements.txt (line 11)) Using cached asn1crypto-0.22.0-py2.py3-none-any.whl Collecting cffi>=1.7 (from cryptography>=1.9->pyopenssl->-r requirements.txt (line 11)) Using cached cffi-1.10.0-cp27-cp27mu-manylinux1_x86_64.whl Collecting azure-mgmt-nspkg (from azure-mgmt-cdn==0.30.0rc5->azure-mgmt==0.30.0rc5->azure==2.0.0rc5->-r requirements.txt (line 7)) Using cached azure_mgmt_nspkg-2.0.0-py2.py3-none-any.whl Collecting pycparser (from cffi>=1.7->cryptography>=1.9->pyopenssl->-r requirements.txt (line 11)) Installing collected packages: ipaddress, six, idna, asn1crypto, enum34, pycparser, cffi, cryptography, secretstorage, keyring, chardet, certifi, urllib3, requests, oauthlib, requests-oauthlib, isodate, msrest, python-dateutil, PyJWT, adal, msrestazure, PyYAML, MarkupSafe, jinja2, pynacl, pyasn1, bcrypt, paramiko, pycrypto, ansible, dopy, boto, futures, docutils, jmespath, botocore, s3transfer, boto3, azure-nspkg, azure-common, azure-batch, azure-servicemanagement-legacy, azure-graphrbac, azure-storage, azure-mgmt-nspkg, azure-mgmt-cdn, azure-mgmt-powerbiembedded, azure-mgmt-notificationhubs, azure-mgmt-authorization, azure-mgmt-batch, azure-mgmt-storage, azure-mgmt-resource, azure-mgmt-web, azure-mgmt-network, azure-mgmt-logic, azure-mgmt-keyvault, azure-mgmt-scheduler, azure-mgmt-compute, azure-mgmt-cognitiveservices, azure-mgmt-redis, azure-mgmt-commerce, azure-mgmt, azure-servicebus, azure, apache-libcloud, pyopenssl

<====== Here, it becomes all red text======>

Exception: Traceback (most recent call last): File "/media/Shared_Data/Downloads/algo-master/env/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/media/Shared_Data/Downloads/algo-master/env/local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/media/Shared_Data/Downloads/algo-master/env/local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install **kwargs File "/media/Shared_Data/Downloads/algo-master/env/local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "/media/Shared_Data/Downloads/algo-master/env/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files isolated=self.isolated, File "/media/Shared_Data/Downloads/algo-master/env/local/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files clobber(source, lib_dir, True) File "/media/Shared_Data/Downloads/algo-master/env/local/lib/python2.7/site-packages/pip/wheel.py", line 329, in clobber os.utime(destfile, (st.st_atime, st.st_mtime)) OSError: [Errno 1] Operation not permitted: '/media/Shared_Data/Downloads/algo-master/env/lib/python2.7/site-packages/ipaddress.py'

help?

bombitmd commented 7 years ago

Ok, so all of those are supposed to be "y" and not "6" Don't know why it showed that :P

irons commented 7 years ago

Any chance you still have to run the command from step 4 in the installation guide?

iflp commented 7 years ago

I have the exact same problem, did you manage to solve this @bombitmd ? @irons in my case when running step 4 I get this error:

/home/vagrant/algo-master/env/bin/python: No module named pip.__main__; 'pip' is a package and cannot be directly executed

arhmn commented 7 years ago

I'm having this issue but could not find a solution for it. I tried reinstalling everything...

iflp commented 7 years ago

@arhmn I was running it on vagrant when I had the error. I spun up a brand new EC2 instance to run it and everything worked without a hitch. Maybe try running the code on a fresh instance.

1ca1 commented 6 years ago

I am having the same issue,

./algo: line 73: ansible-playbook: command not found

dguido commented 6 years ago

Read the docs and please stop posting to github. You didn’t follow the directions.