1

尝试安装 travis cli 会sudo gem install travis -v 1.8.9 --no-rdoc --no-ri生成以下错误日志:

"pkg-config --exists libffi"
package configuration for libffi is not found
"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L.     -lruby.2.3.0  -lpthread -ldl -lobjc "
In file included from conftest.c:1:
In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
        ^~~~~~~~~~~~~~~
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

似乎很少有依赖项丢失。如何正确安装它们?我目前正在使用 macos mojave 10.14

4

2 回答 2

19

brew install travis为我工作。我在这里找到了

于 2019-08-13T20:51:42.300 回答
0

我无法使用 xcode 命令行开发人员工具内置的 ruby​​ 安装 travis,但使用安装 rubybrew install ruby​​ 后sudo gem install travis -v 1.8.9 --no-rdoc --no-ri导致 travis 安装成功。

注意:您可能需要将 travis gem 添加到系统路径中。

于 2018-11-05T22:16:24.230 回答