Tag: osx lion

`build_extensions’:错误:无法构建gem原生扩展。 (gem::安装:: ExtensionBuildError)

在OS X Lion上尝试启动rails服务器时出现错误 Could not find json-1.5.4 in any of the sources Run `bundle install` to install missing gems. 如果我然后跑 bundle install json 我收到以下错误 Installing json (1.5.4) with native extensions /Library/Ruby/Site/1.8/rubygems/installer.rb:556:in `build_extensions’: ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h Gem files will remain […]

为什么我得到“C编译器无法创建可执行文件”(在此之前成功编写C代码并编译)?

这是我在输入时遇到的错误./configure: checking build system type… x86_64-apple-darwin11.3.0 checking host system type… x86_64-apple-darwin11.3.0 checking target system type… x86_64-apple-darwin11.3.0 checking whether the C compiler works… no configure: error: in `/opt/ruby-1.9.3-p125′: configure: error: C compiler cannot create executables See `config.log’ for more details 如上所述,我正在尝试编译Ruby源代码。 我做了一些研究,但看起来没有人试图在Lion上自己编译代码。 我目前正在运行10.7.3 OS X Lion,Macbook Pro。

在Lion上安装带有RVM的1.9.3时出错

我已经烧掉了一个令人尴尬的数小时试图在Mac上安装ruby和rails。 我正在使用Lion 10.7.2,Xcode 4.2.1,rvm 1.10.0和gcc 4.2.1有没有人有一个万无一失的方法来安装ruby与rvm。 或者,是吗? rvm install 1.9.2 -C –with-readline-dir=$rvm_path/usr –with-iconv-dir=$rvm_path/usr 产生错误 make[1]: *** [../../.ext/x86_64-darwin11.2.0/tcltklib.bundle] Error 1 make: *** [mkmain.sh] Error 1 运行 rvm install 1.9.3-p0 –with-gcc=clang 产生错误 make: *** [.rbconfig.time] Abort trap: 6 简单地跑 rvm install 1.9.3 产生错误 make[2]: *** [../../.ext/x86_64-darwin11.2.0/tcltklib.bundle] Error 1 make[1]: *** [ext/tk/all] Error 2 make: *** [build-ext] Error […]

使用./configure –with-gcc = clang在Xcode 4.2上使用Lion构建Ruby 1.9.3

我的环境:使用Xcode 4.2.1的Mac OS X v10.7.2 我正在尝试使用Xcode 4.2.1在Lion上构建ruby 1.9.3。 我理解Xcode 4.2.1附带的基于llvm的gcc编译器存在问题。 但我正试图通过遵循这些说明来解决这个问题, http://goo.gl/Sc39g 。 我能够走得更远,但后来遇到了这两个问题: #error请在编译标志中添加-D_FILE_OFFSET_BITS = 64! 致命错误:找不到’sys / statfs.h’文件 完整的配置输出在这里: http : //cl.ly/2q2G3p3r3S133i0U1i1e (错误一直在底部) 请指教。 提前致谢。 PS我已经阅读了类似/相关问题的列表,但似乎没有人解决这两个特定的错误,或者我错过了它们,因为我的眼睛开始从我尝试使这个构建工作的所有事情上釉。 如果这个问题已经得到解答,请指出我的答案,并接受我的重复道歉。

Ruby on Rails服务器无法启动:dyld:惰性符号绑定失败:未找到符号:_mysql_get_client_info

环境(Mac OS X 10.7.2 – Lion): $ ruby -v ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10] $ rails -v Rails 3.1.3 $ mysql -v Server version: 5.1.44 我尝试运行以下操作,但每次即使应用了来自整个网络的修复程序后,我也会遇到同样的错误: $ rails server dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info Referenced from: /Users/pressplay/.rvm/gems/ruby-1.9.3-p0/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle Expected in: flat namespace dyld: Symbol not found: _mysql_get_client_info Referenced from: /Users/pressplay/.rvm/gems/ruby-1.9.3-p0/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle Expected […]

Lion OSX:如何安装libfreetype.6.dylib?

我正在尝试安装ruby gem,但安装过程已停止,因为: ld: file not found: /usr/local/lib/libfreetype.6.dylib for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 我该如何安装这个库? 我检查了/usr/local/lib/ ,那里缺少库。 编辑: 我跑了找到libfreetype.6.dylib并得到: /Applications/MAMP/Library/lib/libfreetype.6.dylib /Applications/VLC.app/Contents/MacOS/lib/libfreetype.6.dylib /Applications/XAMPP/xamppfiles/lib/libfreetype.6.dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/lib/libfreetype.6.dylib /Applications/calibre.app/Contents/Frameworks/libfreetype.6.dylib /Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib /Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM /Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents /Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Info.plist /Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources /Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources/DWARF /Users/xxxxx/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources/DWARF/libfreetype.6.dylib /Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib /Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM /Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents /Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Info.plist /Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources /Users/xxxxx/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources/DWARF /Users/v/rubydev/sharelock-staging/magick-installer/freetype-2.4.3/objs/.libs/libfreetype.6.dylib.dSYM/Contents/Resources/DWARF/libfreetype.6.dylib /opt/X11/lib/libfreetype.6.dylib /usr/local/Cellar/freetype/2.4.10/lib/libfreetype.6.dylib 但为什么系统找不到图书馆?

Ruby使用rbenv在OSX Lion上失败

我一直在尝试在我的Lion机器上安装Ruby(OSX 10.7.3)。 我安装了rbenv和ruby-build,我试图在我的机器上获得1.9.2-p290。 以下是安装失败的输出: $ rbenv install 1.9.2-p290 Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz… Installing yaml-0.1.4… Installed yaml-0.1.4 to /Users/CSC/.rbenv/versions/1.9.2-p290 Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz… Installing ruby-1.9.2-p290… BUILD FAILED Inspect or clean up the working tree at /var/folders/vm/gcqcld015jx025m7qgtxvw0m0000gn/T/ruby-build.20120301140751.6239 Results logged to /var/folders/vm/gcqcld015jx025m7qgtxvw0m0000gn/T/ruby-build.20120301140751.6239.log Last 10 log lines: /usr/bin/gcc-4.2 -I. -I../../../.ext/include/x86_64-darwin11.3.0 -I../../.././include -I../../.././ext/racc/cparse -DRUBY_EXTCONF_H=\”extconf.h\” -I’/Users/SamCouch/.rbenv/versions/1.9.2-p290/include’ -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith […]

RVM – MacPorts不会通过代理更新

我正在尝试使用RVM在我的iMac上安装ruby。 我首先键入以下内容: rvm list known 然后,我使用以下行来定位我要安装的版本(我正在遵循建议1.9.2而不是基础1.8.7的指南): rvm install 1.9.2 然后我明白了: 27698AM:~ butler15$ rvm install 1.9.2 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.7/x86_64/ruby-1.9.2-p320. Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies. Installing requirements for osx, might require sudo password. Password: 我输入密码,我得到了这个: DEBUG: […]

RSpec升级到OSX Lion后停止工作

dyld: Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib Referenced from: /opt/local/bin/identify Reason: image not found 有没有人有办法解决吗? 将Xcode升级到4.1有帮助吗?

Lion:RVM安装rubies的问题 – 与openssl相关的问题

我已经绝望了,现在两个(!!)天都没有解决方案来解决以下问题。 在对Lion进行更新后,我想使用最新版本的rvm安装其他ruby。 以下是我之后调用bundler时会发生的事情: /Users/felix/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’: dlopen(/Users/janroesner/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.1.0/digest/sha1.bundle, 9): Symbol not found: _SHA1_Init (LoadError) 好的,openssl问题。 所以我检查了没有openssl但是/ usr中的系统有/ usr / lib中的库和/ usr / include / openssl中的头文件。 校验。 我决定用brew安装一个更新的版本。 之后,没有ruby编译已经定义了BN_rand_range和BN_peudo_rand_range的错误。 似乎是对最近的gcc进行更严格的类型检查,所以我在/usr/include/openssl/bn.h中取消注释导致冲突的411和412行导致ruby定义它们自己。 现在ruby编译但我收到相同的错误符号未找到:_SHA1_Init。 所以我删除了openssl头文件bn.h中的注释,我之前放在那里并尝试相反的方法。 我在〜/ .rvm / src / ruby​​-1.9.2-p290 / ext / openssl / openssl_missing.h中对这些行进行了评论。 结果相同。 之后我完全删除了〜/ .rvm,重新安装它并且……有同样的问题。 现在我试过了: rvm pkg install openssl rvm remove 1.9.2-p290 rvm install 1.9.2-p290 […]