安装travis-cli时在macOS中找不到libffi的软件包配置 [英] package configuration for libffi is not found in macOS while installing travis-cli

查看:196
本文介绍了安装travis-cli时在macOS中找不到libffi的软件包配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装 gem install tr​​avis 以按照参考travis-cli rel ="noreferrer"> https://rubygems.org/gems/travis 但出现错误.

I am trying to install gem install travis to use travis-cli as per reference https://rubygems.org/gems/travis but getting below error.

此处提到的尝试解决方案 https://github.com/ffi/ffi/issues/653 :

Tried solution mentioned here https://github.com/ffi/ffi/issues/653 :

brew reinstall libffi
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
gem install travis

找不到libffi的

软件包配置" xcrun clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby​​-2.3.0/universal-darwin16-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby​​-2.3.0/ruby​​/backward -I/Library/Developer/CommandLineTools/SDK/MacOSX.sdk/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 -iwithsysroot/usr/local/libressl/include conftest.c -L.-L/系统/库/框架/Ruby.framework/版本/2.3/usr/lib -L.-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.Internal.sdk/usr/local/libressl/lib -L ​​/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.Internal.sdk/usr/local/lib -arch x86_64 -arch i386 -lruby.2.3.0 -lpthread -ldl -lobjc在conftest.c:1包含的文件中:在/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33中包含的文件中:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10:致命错误:找不到'ruby/config.h'文件#include"ruby​​/config.h"^ ~~~~~~~~~~~~~~产生1个错误.检查的程序是:/* 开始 */1:#include"ruby​​.h";2:3:int main(int argc,char * argv)4:{5:返回0;否则返回0.6:}/结尾*/

package configuration for libffi is not found "xcrun clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin16 -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/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 -iwithsysroot /usr/local/libressl/include conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L. -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.Internal.sdk/usr/local/libressl/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.Internal.sdk/usr/local/lib -arch x86_64 -arch i386 -lruby.2.3.0 -lpthread -ldl -lobjc " In file included from conftest.c:1: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/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 */

任何帮助将不胜感激!尝试找出答案,但没有找到帮助

Any help will be appreciated! try finding out but didn't find helpful

推荐答案

这可以解决问题

sudo gem install -n /usr/local/bin cocoapods -v 1.8.4

最新的CocoaPods 1.10.0无法正常工作.

Latest CocoaPods 1.10.0 won't work.

更新!

如果您想安装CocoaPods 1.10.0 +,则可以使用 HomeBrew ,然后在命令行中输入以下内容

if you want to instal CocoaPods 1.10.0 + you can use HomeBrew and then enter the below in command line

brew install cocoapods

这篇关于安装travis-cli时在macOS中找不到libffi的软件包配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆