安装frida遇到的坑
原始环境:
Windows 10
Python 3.7.3
执行命令:
pip install frida
报如下错误:
Collecting frida
Using cached https://files.pythonhosted.org/packages/c6/0e/9b837472e1dd866ef002a6bf5f2dde42b0c4f0bfcf8f5ab80797a148025e/frida-15.1.17.tar.gz
Requirement already satisfied: setuptools in c:\users\jerry\appdata\local\programs\python\python37\lib\site-packages (from frida) (40.8.0)
Installing collected packages: frida
Running setup.py install for frida … error
Complete output from command c:\users\jerry\appdata\local\programs\python\python37\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\Jerry\AppData\Local\Temp\pip-install-mevguh8w\frida\setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record C:\Users\Jerry\AppData\Local\Temp\pip-record-yd0eyyw7\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\frida
copying frida\core.py -> build\lib.win-amd64-3.7\frida
copying frida_init_.py -> build\lib.win-amd64-3.7\frida
running build_ext
error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>
looking for prebuilt extension in home directory, i.e. C:\Users\Jerry/frida-15.1.17-py3.7-win-amd64.egg
prebuilt extension not found in home directory, will try downloading it
querying pypi for available prebuilds
using default index URL: https://pypi.org/simple/
downloading package list from https://pypi.org/simple/frida/
unable to download it within 20 seconds; please download it manually to C:\Users\Jerry/frida-15.1.17-py3.7-win-amd64.egg
----------------------------------------
Command “c:\users\jerry\appdata\local\programs\python\python37\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\Jerry\AppData\Local\Temp\pip-install-mevguh8w\frida\setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record C:\Users\Jerry\AppData\Local\Temp\pip-record-yd0eyyw7\install-record.txt --single-version-externally-managed --compile” failed with error code 1 in C:\Users\Jerry\AppData\Local\Temp\pip-install-mevguh8w\frida
You are using pip version 19.0.3, however version 22.0.4 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.
意思是:
SSL证书、字符、目录有错误,这都不是pip的错误,而是python的安装文件的问题。所以解决办法是:
卸载干净python程序文件,下载python 3.7.9版本,然后安装再执行pip install frida
命令就不会出错了,会有一个警告信息,意思是你的pip不是最新版本,我们无需管它。