macos - MacOS Mojave:检查存档器 (ar) 界面时,./configure 脚本失败
问题描述
我./configure
在构建使用 autoconf 的 OpenFST 包之前运行该命令。检查ar
接口时脚本失败:
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... unknown
configure: error: could not determine ar interface
这似乎与这个问题有关,但我不明白如何使脚本使用正确的 MacOS 文件以便配置工作。
解决方案
查看 config.log 内部,发现问题与使用位于 in而不是in 中的错误ar
和错误有关。ranlib
/opt/local/bin/
/usr/bin
运行这个解决了这个问题:
sudo mv /opt/local/bin/ranlib /opt/local/bin/ranlib-backup-2019-02-09
sudo mv /opt/local/bin/ar /opt/local/bin/ar-backup-2019-02-09
基于此讨论中的建议: https ://github.com/commercialhaskell/stack/issues/4380
推荐阅读
- dictionary - 在 F# 中多次更新地图
- postgresql - 如何将 PostgreSQL 文本搜索与模糊字符串匹配相结合
- swift - UITextView.highlight 自动滚动到文档底部
- php - window.location.replace 不工作 Laravel ajax
- visual-studio - shutil 错误:“模块‘shutil’没有‘复制’成员”
- node.js - 猫鼬日期比较没有时间和按createdAt和staffId分组,按聚合计算每周、每月和每年的员工总数?
- java - 合并 2 个数组并删除重复输入
- codeigniter - 有没有一种方法可以让我从数据库中减去一个值并输入类型文本编号?
- java - Docker 卷映射 + windows = 难以置信的慢?
- javascript - 10 秒后消失 grails 警报消息