我很新的OS X和我不知道如何編譯,MacPorts的,自制等。所有我想要做的是安裝在OS XOS X 10.6安裝引入nokogiri
的引入nokogiri創業板什麼Windows中,這是簡單的:
gem install nokogiri
然而,當我嘗試這在OS X上,我得到以下信息:
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/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 installed in /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.4 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.4/ext/nokogiri/gem_make.out
同樣,我也不是很不錯的OS X和我不知道這是什麼意思。
有沒有一種簡單的方法來安裝Nokogiri,而不必搗亂MacPorts和我在線閱讀過的其他程序?
我安裝了XCode 4(有人說XCode是需要這個工作的),我使用Ruby 1.8.7。
而且,我嘗試安裝的MacPorts和網上按照指示,我得到如下:
Derek-MacBook-Pro:~ derek$ sudo port install libxml2 libxslt
Password:
---> Computing dependencies for libxml2Error: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
To report a bug, see <http://guide.macports.org/#project.tickets>
XCode是最新的,這是非常重要的。雪豹DVD上的版本被破壞。從蘋果的XCode網站下載當前的XCode,並安裝它,如果它更新。這是一個大文件,所以下載需要一段時間。 – 2011-03-31 23:55:47