【问题标题】:flex command not found when installing flex安装flex时找不到flex命令
【发布时间】:2015-10-14 17:24:26
【问题描述】:
tar xvjf flex-2.5.39.tar.bz2      // Uncompress the archive

cd flex-2.5.39                    // 

./configure --prefix=$HOME/flex   // ./configure

       *No errors*                //  success with no error
make                              //  run make

One thounsand lines later...      // Error
.../flex-2.5.39/missing: line 52: flex: command not found
WARNING: `flex` is missing on your system. You should only need it if you modified a `.l` ...etc  

错误说我的系统中没有安装 flex,我缺少什么?我正在安装它。
谢谢

【问题讨论】:

  • command not found 行之前包含更多错误上下文会有所帮助。或者这真的只是一个警告(不是错误),然后构建成功完成?

标签: linux makefile redhat flex-lexer configure


【解决方案1】:

这很奇怪——你不应该需要现有的 flex,除非你在构建它之前修改了 scan.l。

检查 scan.c 和 scan.l 上的时间戳,确保 scan.c 存在且更新。如果没有,请运行

tar xjfv flex-2.5.39.tar.bz2 flex-2.5.39/scan.c

在父目录中重新提取(只是)scan.c,然后重新运行make(应该不需要重新配置)。

【讨论】:

  • 也许你是对的。我不知道发生了什么,但是当我重新 tar 文件并执行相同的命令时,它可以工作!谢谢克里斯
  • 为什么这个问题被否决了?我尽量简短,同时提供必要的信息
  • 9 个月后,我再次遇到同样的问题,如果有人寻找同样的问题,我重新 tar 包即可解决。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-04-06
  • 2022-06-14
  • 2012-08-02
  • 2013-03-28
  • 2016-11-04
相关资源
最近更新 更多