我試圖設置一個基於雲的IDE(在Windows機器上)來測試和更新GitHub上的Ruby項目。我很難安裝所有必需的部件。使用Cloud9安裝GeoIP時出現的問題(Windows 10)
'捆綁安裝' 工程,以一個點的話,就無法在這裏:
checking for iconv_open() in iconv.h... yes
checking for GeoIP_record_by_ipnum() in -lGeoIP... no
you must have geoip c library installed!
.
.
An error occurred while installing geoip-c (0.9.1), and Bundler cannot continue.
Make sure that `gem install geoip-c -v '0.9.1'` succeeds before bundling.
所有這些失敗:
gem install geoip-c
gem install geoip-c -v '0.9.1'
gem install geoip-c -- --with-geoip-dir=/opt/GeoIP
與此錯誤消息:
ERROR: Error installing geoip-c:
ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.4.1/gems/geoip-c-0.9.1/ext/geoip
/usr/local/rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20170628-2852-11bgk28.rb extconf.rb
checking for iconv_open() in iconv.h... yes
checking for GeoIP_record_by_ipnum() in -lGeoIP... no
you must have geoip c library installed!
去過現在抓了我的腦子幾天 - 任何幫助感激地讚賞。
你看了這篇文章嗎? https://stackoverflow.com/questions/2748168/error-installing-geoip-city-gem#2754397 –
是的,我得到同樣的錯誤:'在-lGeoIP中檢查GeoIP_record_by_ipnum()...沒有\ n你必須有geoip c library installed!' – huey
在那篇文章中,他們使用'env ARCHFLAGS =「 - arch x86_64」'運行'gem install geoip_city - --with-geoip-dir =/opt/GeoIP'「,以便指定系統是64位..他們也以'sudo'(系統用戶)的系統用戶身份運行該命令, –