Doxygen - 找不到 FLEX(丢失:FLEX_EXECUTABLE) [英] Doxygen - Could NOT find FLEX (missing: FLEX_EXECUTABLE)

查看:72
本文介绍了Doxygen - 找不到 FLEX(丢失:FLEX_EXECUTABLE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这里有一些措辞非常相似的问题,但我在那里找不到我的问题的答案,所以我们开始:
我想看看我的哪些 C++ 方法被其他人调用,所以我在谷歌搜索后找到了 Doxygen.
在他们的页面上,安装看起来非常简单:

I know there are very similar worded questions on here, but I could not find an answer to my question there, so here we go:
I'm trying to see which of my C++ methods are called by others so I found Doxygen after googling.
On their page the installation seems pretty straightforward:

如果您安装了必要的构建工具(即 g++、python、cmake、flex、bison),您应该执行以下操作以获得初始存储库的副本:

If you have the necessary build tools installed (i.e. g++, python, cmake, flex, bison), you should do the following to get the initial copy of the repository:

git clone https://github.com/doxygen/doxygen.git
cd doxygen
mkdir 构建
cd build
cmake -G "Unix Makefiles" ..
制作

直到 cmake -G "Unix Makefiles" .. 一切顺利,然后在该命令上出现以下错误:

Until cmake -G "Unix Makefiles" .. everything goes well, then on that command following error occurs:

test@test-VirtualBox:~/doxygen/build$ cmake -G "Unix Makefiles" ..
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find FLEX (missing: FLEX_EXECUTABLE)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindFLEX.cmake:230 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:84 (find_package)

我想:没什么大不了的,为什么任何东西都可以开箱即用...似乎我必须安装 flex.
所以我这样做:
sudo apt-get 更新
sudo apt-get install flex
sudo apt autoremove(因为安装后命令行建议我这样做)

I thought: No big deal, why should anything work out of the box...seems I have to install flex.
So I do:
sudo apt-get update
sudo apt-get install flex
sudo apt autoremove (because after installation the command line recommended me to do this)

现在在我看来 flex 已经安装,我再次尝试 cmake -G "Unix Makefiles" .. ......同样的错误.我关闭命令行,再次启动它,再试一次 - 同样的错误...
所以现在我慢慢开始生气并转向 Stack Overflow 寻求帮助 :D
我究竟做错了什么???

Now it seems to me that flex has been installed, I try cmake -G "Unix Makefiles" .. again...same error. I close the command line, start it up again, try it again - same error...
So now I'm slowly gettin' pissed and turn to Stack Overflow for help :D
What am I doing wrong???

因为我在另一个问题的评论中看到有人问这个,所以这是 flex 的输出:

And because I saw someone asking this in the other question's comment, here's the output of flex:

test@test-VirtualBox:~/doxygen/build$ flex
The program 'flex' can be found in the following packages:
 * flex
 * flex-old
Try: sudo apt install <selected package>

推荐答案

看来 apt autoremove 确实删除了我上一步刚安装的包.
所以对我有用的是:

It seems like apt autoremove really removed the package I just installed in the previous step.
So what worked for me was:

git clone https://github.com/doxygen/doxygen.git
cd doxygen
mkdir build
cd build

这些是新的:

sudo apt-get install flex
sudo apt-get install bison

<小时>

cmake -G "Unix Makefiles" ..
make

...但当然恐怖不会就此结束,请参阅我的下一个问题 :D

...but of course the horror wouldn't end there, see my next question :D

这篇关于Doxygen - 找不到 FLEX(丢失:FLEX_EXECUTABLE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆