jotyGill / openpyn-nordvpn

Easily connect to and switch between, OpenVPN servers hosted by NordVPN on Linux (+patch leakes)
GNU General Public License v3.0
628 stars 114 forks source link

installation on OpenWrt Stable 1806 fails #203

Open vKnmnn opened 5 years ago

vKnmnn commented 5 years ago

Hi, I'm currently trying to get this to werk on my WRT router.

STEPS:

opkg install sudo iputils-ping unzip
opkg install python3 python3-setuptools python3-pip
pip3 install --upgrade setuptools pip 
pip3 install colorama humanfriendly coloredlogs verboselogs requests
pip3 install -vv openpyn 

Instalation will fail at a late stage with this output:

    creating /usr/lib/python3.6/site-packages/openpyn
    creating /usr/lib/python3.6/site-packages/openpyn/scripts
    copying build/lib/openpyn/scripts/update-systemd-resolved.sh -> /usr/lib/python3.6/site-packages/openpyn/scripts
    copying build/lib/openpyn/scripts/update-resolv-conf.sh -> /usr/lib/python3.6/site-packages/openpyn/scripts
    copying build/lib/openpyn/scripts/manual-dns-patch.sh -> /usr/lib/python3.6/site-packages/openpyn/scripts
    creating /usr/lib/python3.6/site-packages/openpyn/management
    copying build/lib/openpyn/management/management.py -> /usr/lib/python3.6/site-packages/openpyn/management
    copying build/lib/openpyn/config.json -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/locations.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/api.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/asus.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/__main__.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/__init__.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/initd.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/systemd.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/root.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/filters.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/openpyn.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/converter.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/firewall.py -> /usr/lib/python3.6/site-packages/openpyn
    copying build/lib/openpyn/credentials.py -> /usr/lib/python3.6/site-packages/openpyn
    warning: install_lib: byte-compiling is disabled, skipping.

    running install_data
    error: can't copy './openpyn/S23openpyn': doesn't exist or not a regular file 
    error
    Cleaning up...
    Removing source in /tmp/pip-install-qrvas45e/openpyn
    Removed build tracker '/tmp/pip-req-tracker-_qr150n5'
    Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-qrvas45e/openpyn/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-42lp50js/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-qrvas45e/openpyn/
    Exception information:
    Traceback (most recent call last):
    File "/usr/lib/python3.6/site-packages/pip/_internal/basecommand.py", line 141, in main
    status = self.run(options, args)
    File "/usr/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 347, in run
    use_user_site=options.use_user_site,
    File "/usr/lib/python3.6/site-packages/pip/_internal/req/__init__.py", line 49, in install_given_reqs
    **kwargs
    File "/usr/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 972, in install
    spinner=spinner,
    File "/usr/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 701, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-qrvas45e/openpyn/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-42lp50js/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-qrvas45e/openpyn/

So far thanks for this tool. I'm all for a luci-app to configure this. Might look into that if i catch some free time.

vKnmnn commented 5 years ago

Interestingly, openpyn does get installed properly. When running /usr/share/python3.6/site-packages/openpyn/openpyn.py --init, it fails right away, due to a missing import with the name api. When run via python ( python3 -m openpyn --init) this missing import does not appear.

The same happens without the --init switch.

Finally i can get Openpyn to connect to a Server, but it warns me about resolv.confnot being changed. Then i check if i can reach 8.8.8.8. The router reaches it, but no other device in LAN .

stefanodinc commented 4 years ago

Hi, did you solve the problem? Is it working now on openwrt? If yes, how? Thank you

1951FDG commented 2 years ago

Please try openpyn 3.0.0!