问题遇到的现象和发生背景
在解决安装问题中的graphit.tab.c:150:10:fatal error:graphit.tab.h:没有那个文件或目录
问题之后(只需要用bison -d /home/zsy/AutoPentest/mulval/src/attack_graph/graphit.y生成这个文件即可)
https://blog.csdn.net/qq_41172122/article/details/101396446?utm_source=app&app_version=4.15.0
问题相关代码,请勿粘贴截图
graphit.y:132:12: error: reference to ‘data’ is ambiguous
132 | data.ruleList.add_rule(rulenum, desc_str);
| ^~~~
In file included from /usr/include/c++/11/string:54,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from Queue.h:21,
from attack_graph.h:24,
from graphit.y:7:
运行结果及报错内容
我的解答思路和尝试过的方法
降低gcc版本,不行
尝试修改其中的代码graphit.l的第五行,不行
我想要达到的结果
安装成功生成攻击图