SEED Ubuntu16.04安装pwn-tools

首先需要安装python3.7

整体流程是正确的,在安装过程中你可能需要解决一些问题,但这些问题都很好解决,搜一下就ok。当然,如果你足够幸运,你也许一个问题也不用解决。

根据这个文章安装:https://blog.csdn.net/u010681693/article/details/95044857

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa  #sudo add-apt-repository ppa:jonathonf/python-3.7
sudo apt-get update
sudo apt-get install python3.7
cd /usr/bin
ls -l | grep python
sudo rm python
sudo ln -s python3.7 python
sudo vim /etc/apt/sources.list

在文件结尾添加如下内容,保存并退出:

deb http://cn.archive.ubuntu.com/ubuntu bionic main multiverse restricted universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-proposed main multiverse restricted universe

接着执行:

sudo apt-get update

会出现报错:

(appstreamcli:12392): GLib-CRITICAL **: g_strchug: assertion ‘string != NULL’ failed
(appstreamcli:12392): GLib-CRITICAL **: g_strchomp: assertion ‘string != NULL’ failed
(appstreamcli:12392): GLib-CRITICAL **: g_strchug: assertion ‘string != NULL’ failed
(appstreamcli:12392): GLib-CRITICAL **: g_strchomp: assertion ‘string != NULL’ failed
(appstreamcli:12392): GLib-CRITICAL **: g_strchug: assertion ‘string != NULL’ failed
(appstreamcli:12392): GLib-CRITICAL **: g_strchomp: assertion ‘string != NULL’ failed
AppStream cache update completed, but some metadata was ignored due to errors.

解决办法为执行如下指令:

sudo apt-get install libappstream4

接着执行如下命令:

sudo apt-get install python3-pip

会出现报错:

The following information may help to resolve the situation:
The following packages have unmet dependencies:
debconf : Breaks: update-notifier-common (< 3.187~) but 3.168.3 is to be installed
gnupg : Breaks: software-properties-common (<= 0.96.24.3) but 0.96.20.10 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

使用如下命令解决:

sudo apt-get install aptitude
sudo aptitude install python3-pip
sudo apt install python3-pip

接着会出现报错:

E: Sub-process /usr/bin/dpkg returned an error code (1)

使用如下命令解决:

sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bk
sudo mkdir /var/lib/dpkg/info
sudo apt-get update
sudo apt-get install -f 
sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info.bk
sudo rm -rf /var/lib/dpkg/info
sudo mv /var/lib/dpkg/info.bk /var/lib/dpkg/info

接着继续安装python相关:

sudo apt-get install python3-distutils
sudo vim /usr/local/bin/pip

修改文件如下:

#!/usr/bin/python

# -*- coding: utf-8 -*-
import re
import sys

from pip import main

if __name__ == '__main__':
	sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
	sys.exit(main())

接着执行:

pip --version
python -m pip install --upgrade pip
sudo vim /usr/local/bin/pip

修改文件如下:

#!/usr/bin/python

# -*- coding: utf-8 -*-
import re
import sys

from pip import __main__

if __name__ == '__main__':
	sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
	sys.exit(__main__._main())

然后安装pwn-tools

pip3 install pwn

然后你可能遇到这个比较难解决的问题:

error: can't find Rust compiler
*省略*
ERROR: Failed building wheel for cryptography

执行如下命令解决:

export CRYPTOGRAPHY_DONT_BUILD_RUST=1
pip3 install cryptography==3.1.1
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

D-A-X

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值