Ubuntu16.04设置蜜罐的依赖问题

Ubuntu16.04设置蜜罐的依赖问题

我正在为一门教育课程做一个项目。我正尝试在 Ubuntu 16.04 VM 上设置 Cowrie 蜜罐。我已按照此网站的说明进行操作https://cowrie.readthedocs.io/en/latest/INSTALL.html。首先是安装依赖项,这就是事情出错的地方*。


我使用的命令如下:

sudo apt-get install git python3-virtualenv libssl-dev libffi-dev build-essential libpython3-dev python3-minimal authbind virtualenv

当我输入此信息时,我得到以下内容

Reading package lists... Done
Building dependency tree      
Reading state information... Done
python3-virtualenv is already the newest version (15.0.1+ds-3).
virtualenv is already the newest version (15.0.1+ds-3).
authbind is already the newest version (2.1.1+nmu1).
build-essential is already the newest version (12.1ubuntu2).
git is already the newest version (1:2.7.4-0ubuntu1).
libffi-dev is already the newest version (3.2.1-4).
python3-minimal is already the newest version (3.5.1-3).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpython3-dev : Depends: libpython3.5-dev (>= 3.5.1-2~) but it is not going to be installed
 libssl-dev : Depends: libssl1.0.0 (= 1.0.2g-1ubuntu4) but 1.0.2g-1ubuntu4.15 is to be installed
              Depends: zlib1g-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

然后我尝试手动安装每个依赖项。例如,如上所示,libpython3-dev 依赖于 libpython3.5-dev。因此我尝试安装 libpython3.5-dev,结果如下:

sudo apt-get install libpython3.5-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpython3.5-dev : Depends: libpython3.5-stdlib (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.9 is to be installed
                    Depends: libpython3.5 (= 3.5.1-10) but 3.5.2-2ubuntu0~16.04.9 is to be installed
E: Unable to correct problems, you have held broken packages.

好的,所以 libpython3.5-dev 依赖于 libpython3.5,我再次尝试安装:

sudo apt-get install libpython3.5
[sudo] password for administrator:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
libpython3.5 is already the newest version (3.5.2-2ubuntu0~16.04.9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

因此,在追踪依赖关系到最后时,我被告知所需的包/项目已经是最新版本。此时我不知道该如何继续,网上提供的各种解决方案(改用 aptitude、清理/自动清理缓存、自动修复)都不起作用。我可以在另一台虚拟机上完全重新开始,但这对我没有任何帮助,而且这台机器已被指定用于蜜罐。

*全面披露,这些说明后面有一个步骤出错了,我认为这是因为第一步没有顺利完成(我在看到依赖性问题后天真地继续了下去)。我认为这与上面的依赖性问题有关,因为错误似乎表明 python 文件的语法问题。安装 cowrie 的后面一步是在激活虚拟 cowrie 环境之后(注意提示)。错误如下:

(cowrie-env) cowrie@secureset:~/cowrie$ pip install --upgrade pip
Failed to import the site module
Traceback (most recent call last):
  File "/home/cowrie/cowrie/cowrie-env/lib/python3.5/site.py", line 703, in <module>
    main()
  File "/home/cowrie/cowrie/cowrie-env/lib/python3.5/site.py", line 683, in main
    paths_in_sys = addsitepackages(paths_in_sys)
  File "/home/cowrie/cowrie/cowrie-env/lib/python3.5/site.py", line 282, in addsitepackages
    addsitedir(sitedir, known_paths)
  File "/home/cowrie/cowrie/cowrie-env/lib/python3.5/site.py", line 204, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/home/cowrie/cowrie/cowrie-env/lib/python3.5/site.py", line 173, in addpackage
    exec(line)
  File "<string>", line 1, in <module>
  File "/home/cowrie/cowrie/cowrie-env/lib/python3.5/site-packages/_distutils_hack/__init__.py", line 194
    f'spec_for_{name}',
                     ^
SyntaxError: invalid syntax

不要让我发这个帖子来问 Ubuntu,16.04 不受支持。很明显我是新手,但我正在努力学习,并非常感谢任何指导。

相关内容