abrasive / nxBender

Open source client for netExtender SSL VPNs
BSD 3-Clause "New" or "Revised" License
41 stars 20 forks source link

Not working on Ubuntu 20.04 #10

Closed Mattia98 closed 4 years ago

Mattia98 commented 4 years ago

Since Ubuntu 20.04 deprecated python2 it is no longer shipped and the paths are different. pip is now pip3 and python is now python3. Also, after changing the shebang and launching the program I get: ModuleNotFoundError: No module named 'configargparse'

Am I missing something or is this project just not python3 ready?

Here pip output for completeness

$ pip3 install -r requirements.txt
Collecting ConfigArgParse
  Downloading ConfigArgParse-1.2.3.tar.gz (42 kB)
     |████████████████████████████████| 42 kB 259 kB/s 
Collecting ipaddress
  Downloading ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Collecting pyroute2
  Downloading pyroute2-0.5.12.tar.gz (864 kB)
     |████████████████████████████████| 864 kB 1.1 MB/s 
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from -r requirements.txt (line 4)) (2.22.0)
Collecting colorlog
  Downloading colorlog-4.1.0-py2.py3-none-any.whl (14 kB)
Building wheels for collected packages: ConfigArgParse, pyroute2
  Building wheel for ConfigArgParse (setup.py) ... done
  Created wheel for ConfigArgParse: filename=ConfigArgParse-1.2.3-py3-none-any.whl size=19326 sha256=cff8a839264d888acd5254751fcb4cbaa06d1c5cc8c9bbd02a4b1d9edbbecb56
  Stored in directory: /home/mattia/.cache/pip/wheels/b4/12/fe/1e4628f6ec22a9580d9e8fbef23df7a03948a1edde0821d7f5
  Building wheel for pyroute2 (setup.py) ... done
  Created wheel for pyroute2: filename=pyroute2-0.5.12-py3-none-any.whl size=381421 sha256=b8639ee4ec2496ee25905bf35c12fa71e9021b60d3fadb9de5d7825f12768325
  Stored in directory: /home/mattia/.cache/pip/wheels/e9/c7/c0/8173ea3b27edd0f8bc962a287528c6209dc7e028dafadf67ab
Successfully built ConfigArgParse pyroute2
Installing collected packages: ConfigArgParse, ipaddress, pyroute2, colorlog
Successfully installed ConfigArgParse-1.2.3 colorlog-4.1.0 ipaddress-1.0.23 pyroute2-0.5.12
abrasive commented 4 years ago

Yeah, you're missing something ;-)

Reading between the lines of your report, it looks like you ran pip install as yourself, then sudo nxBender to run it, right?

The problem with that is, pip install will have installed the dependencies to your ~. So if you run nxBender as yourself, Python will find the dependencies. But if you run as root, it won't look in your ~, and so it won't find them.

The best way to install it is actually to use the setup.py - I've updated the README to reflect this. You can do sudo pip3 install ., and then you should get an nxBender executable on your PATH. This will also avoid any shebang issues.

The shebangs are correct for the modern distros I use, ie. where /usr/bin/python has been either Python2 or Python3 according to the user's preference. That said, I don't intend to support Py2 anymore, so changing them to python3 would be eminently reasonable.

Mattia98 commented 4 years ago

Yes, you where right. I deleted the installation and cloned it back down and ran the setup.py as root like you suggested. That works for me. For me right now running python does nothing. There is a package though that adds a symlink to python3.

$ python

Command 'python' not found, did you mean:

  command 'python3' from deb python3
  command 'python' from deb python-is-python3

Anyway, thank you very much for this. The official client is just a PITA.

abrasive commented 4 years ago

Thanks for the info! And I'm glad you find the tool useful :)

On 29 April 2020 2:01:18 am Mattia98 notifications@github.com wrote:

Yes, you where right. I deleted the installation and cloned it back down and ran the setup.py as root like you suggested. That works for me. For me right now running python does nothing. There is a package though that adds a symlink to python3. $ python Command 'python' not found, did you mean: command 'python3' from deb python3 command 'python' from deb python-is-python3 Anyway, thank you very much for this. The official client is just a PITA. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

mstrkoffee commented 1 year ago

Hello, I'm trying to get this running on aarch64 Ubuntu on a RPI4 (not sure if that's the cause) - I'm getting an exit code 1

INFO Logging in... INFO Starting session... INFO Dialing up tunnel... ERROR pppd exited with code 1 INFO Shutting down...

any help would be appreciated - works quite well on my laptop on x86_64 Thank You!