Can someone tell me how I can install flex (lexical analyzer) on my Mac? I searched everywhere on google and I can't find it. I have the universal binary and I extracted it to my desktop but I have no idea where to go from here. Any help would be greatly appreciated!
有人能告诉我如何在我的Mac上安装flex(词法分析器)吗?我在谷歌的各个地方搜索,我找不到它。我有通用二进制文件,我将它提取到我的桌面,但我不知道从哪里开始。任何帮助将不胜感激!
5 个解决方案
#2
4
You can always install from source. Download the tarball from the flex site, extract it, cd to the directory where you extracted it, and run the following:
您始终可以从源安装。从flex站点下载tarball,解压缩,cd到你解压缩的目录,然后运行以下命令:
./configure
make
make install
make clean
Assuming you have make and a C compiler on your Mac, which I believe all Macs have.
假设你的Mac上有make和C编译器,我相信所有的Mac都有。
#3
3
Try using Homebrew (Packet manager for Mac) and use the following command :-
尝试使用Homebrew(Mac的数据包管理器)并使用以下命令: -
brew install flex
#4
2
Flex is shipped with the xCode Command line tools; you only got to install them via xcode > preferences > downloads > Command line tools. This also includes gcc (Clang).
Flex随xCode命令行工具一起提供;你只需要通过xcode> preferences> downloads>命令行工具安装它们。这还包括gcc(Clang)。
#5
0
This info can help to somebody to save time:
此信息可以帮助有人节省时间:
Just today I have try to install FLEX 2.5.39 from sources. Make - fails.
就在今天,我尝试从源代码安装FLEX 2.5.39。制造 - 失败。
After some thoughts I have decide to try older archives. 2.5.38 - fail 2.5.37 - OK
经过一番思考后,我决定尝试更旧的档案。 2.5.38 - 失败2.5.37 - 好的
It seems on now() = 2015-03-15, macport also uses 2.5.37 build.
现在似乎()= 2015-03-15,macport也使用了2.5.37版本。
#1
#2
4
You can always install from source. Download the tarball from the flex site, extract it, cd to the directory where you extracted it, and run the following:
您始终可以从源安装。从flex站点下载tarball,解压缩,cd到你解压缩的目录,然后运行以下命令:
./configure
make
make install
make clean
Assuming you have make and a C compiler on your Mac, which I believe all Macs have.
假设你的Mac上有make和C编译器,我相信所有的Mac都有。
#3
3
Try using Homebrew (Packet manager for Mac) and use the following command :-
尝试使用Homebrew(Mac的数据包管理器)并使用以下命令: -
brew install flex
#4
2
Flex is shipped with the xCode Command line tools; you only got to install them via xcode > preferences > downloads > Command line tools. This also includes gcc (Clang).
Flex随xCode命令行工具一起提供;你只需要通过xcode> preferences> downloads>命令行工具安装它们。这还包括gcc(Clang)。
#5
0
This info can help to somebody to save time:
此信息可以帮助有人节省时间:
Just today I have try to install FLEX 2.5.39 from sources. Make - fails.
就在今天,我尝试从源代码安装FLEX 2.5.39。制造 - 失败。
After some thoughts I have decide to try older archives. 2.5.38 - fail 2.5.37 - OK
经过一番思考后,我决定尝试更旧的档案。 2.5.38 - 失败2.5.37 - 好的
It seems on now() = 2015-03-15, macport also uses 2.5.37 build.
现在似乎()= 2015-03-15,macport也使用了2.5.37版本。