我正在使用ParrotOS,目前正在HTB上运行prolabs Dante,但我在旋转时遇到了问题。
然而,我已经安装了带有sudo apt-get install sshuttle
的sshuttle,当我只是尝试运行";sshuttle";它返回时带有:
Traceback (most recent call last):
File "/usr/local/bin/sshuttle", line 11, in <module>
load_entry_point('sshuttle==1.0.5.dev17+g299854d', 'console_scripts', 'sshuttle')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/dist-packages/sshuttle-1.0.5.dev17+g299854d-py2.7.egg/sshuttle/cmdline.py", line 5, in <module>
import sshuttle.client as client
File "/usr/local/lib/python2.7/dist-packages/sshuttle-1.0.5.dev17+g299854d-py2.7.egg/sshuttle/client.py", line 13, in <module>
import sshuttle.ssh as ssh
File "/usr/local/lib/python2.7/dist-packages/sshuttle-1.0.5.dev17+g299854d-py2.7.egg/sshuttle/ssh.py", line 7, in <module>
import importlib.util
ImportError: No module named util
然而,当我尝试pip install util
或pip3 install util
时,它说找不到任何名为util的包。
如何修复此错误以运行sshuttle?
我在树莓派上也出现了同样的错误。我用成功安装了sshuttle
sudo pip3 install sshuttle
不知怎的,sshuttle使用的python 2.7无法理解:import importlib.util
使用pip3进行安装会强制已安装的sshuttle使用python3