【发布时间】:2015-10-01 13:12:15
【问题描述】:
我需要在 OS X 下编译一些 LEX/YACC 文件(*.l)。并且需要GNU flex 作为扫描仪。
但是,我在安装 GNU flex 时被卡住了。
-
运行
brew install flex,但出现错误:Error: You must `brew link xz' before flex can be installed
然后我运行
brew link xz,还是报错:Error: Could not symlink lib/pkgconfig/liblzma.pc /usr/local/lib/pkgconfig is not writable.
home brew引起的吗?
关于我的“酿造”的一些细节:
运行brew doctor
Warning: /usr/local/lib/pkgconfig isn't writable.
This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.
You should probably `chown` /usr/local/lib/pkgconfig
运行ls 命令
yeze@yezedeMacBook-Pro:~$ ls -la /usr/local/lib/pkgconfig
total 16
drwxr-xr-x 4 root wheel 136 Mar 31 2013 .
drwxr-xr-x 30 yeze admin 1020 Oct 1 21:05 ..
-rw-r--r-- 1 root wheel 405 Mar 30 2013 tcl.pc
-rw-r--r-- 1 root wheel 404 Mar 30 2013 tk.pc
【问题讨论】:
-
brew doctor和ls -la /usr/local/lib/pkgconfig的输出是什么? -
@xhruso00 实际上,我不太明白这个规则......您似乎已经回答了一些问题,例如“无法在 Yosemite 下安装 Xcode 5”。我觉得我的是同类型的,请问这种问题应该在哪里问呢?
-
将它们添加到问题中。
-
我不认为你的问题是“程序员常用的软件工具”。这就是区别
-
@xhruso00 谢谢,我会更加注意问题的质量。
标签: macos homebrew flex-lexer