关于AndroCFG的运行问题

本文最后更新于:4 个月前

这里是在安装https://github.com/U039b/AndroCFG.git时遇到的问题,最开始在windows上安装时并未安装成功,以下便是在Ubuntu下的安装问题以及解决方案

余下的正文

问题描述

在安装requirement环境时,抛出如下错误

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [115 lines of output]
running egg_info
creating /tmp/pip-pip-egg-info-r4t8efng/ssdeep.egg-info
writing /tmp/pip-pip-egg-info-r4t8efng/ssdeep.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-r4t8efng/ssdeep.egg-info/dependency_links.txt
writing requirements to /tmp/pip-pip-egg-info-r4t8efng/ssdeep.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-r4t8efng/ssdeep.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-r4t8efng/ssdeep.egg-info/SOURCES.txt'
In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/syslimits.h:7,
from /usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h:34,
from /home/xxx/anaconda3/envs/z-web/include/python3.8/Python.h:11,
from src/ssdeep/__pycache__/_ssdeep_cffi_a28e5628x27adcb8d.c:2:
/usr/lib/gcc/x86_64-linux-gnu/11/include/limits.h:203:15: fatal error: limits.h: No such file or directory
203 | #include_next <limits.h> /* recurse down to the real one */
| ^~~~~~~~~~
compilation terminated.
/home/xxx/anaconda3/envs/z-web/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Traceback (most recent call last):
File "/home/xxx/anaconda3/envs/z-web/lib/python3.8/site-packages/setuptools/_distutils/unixccompiler.py", line 186, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
File "/home/xxx/anaconda3/envs/z-web/lib/python3.8/site-packages/setuptools/_distutils/ccompiler.py", line 1007, in spawn
spawn(cmd, dry_run=self.dry_run, **kwargs)
File "/home/xxx/anaconda3/envs/z-web/lib/python3.8/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
...

解决方案

1
2
$ sudo apt-get install libosmesa6-dev
$ pip install -r requirements.txt --use-pep517

问题描述

在安装requirement环境时,抛出如下错误

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [118 lines of output]
running dist_info
creating /tmp/pip-modern-metadata-nwfp6dv5/ssdeep.egg-info
writing /tmp/pip-modern-metadata-nwfp6dv5/ssdeep.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-modern-metadata-nwfp6dv5/ssdeep.egg-info/dependency_links.txt
writing requirements to /tmp/pip-modern-metadata-nwfp6dv5/ssdeep.egg-info/requires.txt
writing top-level names to /tmp/pip-modern-metadata-nwfp6dv5/ssdeep.egg-info/top_level.txt
writing manifest file '/tmp/pip-modern-metadata-nwfp6dv5/ssdeep.egg-info/SOURCES.txt'
src/ssdeep/__pycache__/_ssdeep_cffi_a28e5628x27adcb8d.c:266:14: fatal error: fuzzy.h: No such file or directory
266 | #include "fuzzy.h"
| ^~~~~~~~~
compilation terminated.
Traceback (most recent call last):
File "/tmp/pip-build-env-ivrx_t58/overlay/lib/python3.8/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
File "/tmp/pip-build-env-ivrx_t58/overlay/lib/python3.8/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn
spawn(cmd, dry_run=self.dry_run, **kwargs)
File "/tmp/pip-build-env-ivrx_t58/overlay/lib/python3.8/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
...

解决方案

1
$ sudo apt-get install libfuzzy-dev

问题描述

在安装requirement环境时,抛出如下错误

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Traceback (most recent call last):
File "AndroCFG.py", line 24, in <module>
main()
File "AndroCFG.py", line 19, in main
c.compute_rules()
File "/home/xxx/Zhousijie/androTool/AndroCFG/androcfg/call_graph_extractor.py", line 349, in compute_rules
fg.render(path)
File "/home/xxx/anaconda3/envs/z-web/lib/python3.8/site-packages/graphviz/files.py", line 243, in render
rendered = backend.render(self._engine, format, filepath,
File "/home/xxx/anaconda3/envs/z-web/lib/python3.8/site-packages/graphviz/backend.py", line 223, in render
run(cmd, capture_output=True, cwd=cwd, check=True, quiet=quiet)
File "/home/xxx/anaconda3/envs/z-web/lib/python3.8/site-packages/graphviz/backend.py", line 167, in run
raise ExecutableNotFound(cmd)
graphviz.backend.ExecutableNotFound: failed to execute ['dot', '-Kdot', '-Tpng', '-O', 'loadWebview'], make sure the Graphviz executables are on your systems' PATH
...

解决方案

1
$ sudo apt-get install graphviz

关于AndroCFG的运行问题
http://sec-cat.github.io/2023/05/08/AndroCFG/
作者
cat
发布于
2023年5月8日
许可协议