ก่อนหน้านี้ฉันเคยติดตั้ง Jekyll gem บน Mac ด้วยคอมไพเลอร์ gcc ที่มาพร้อมกับ Xcode 3 เรียบร้อยแล้ว แต่น่าเสียดายที่ฉันไม่สามารถติดตั้งบน Mac เครื่องอื่นที่ตอนนี้มี Xcode 4.1 ได้ Mac เครื่องนี้เคยมี Xcode 3 แต่ฉันถอนการติดตั้งโดยใช้คำสั่ง sudo /Developer-3.2.5/Library/uninstall-devtools --mode=all
เมื่อพยายาม sudo gem install jekyll
ฉันได้รับข้อผิดพลาดในการคอมไพล์ที่แสดงด้านล่าง:
Building native extensions. This could take a while... ERROR: Error installing jekyll: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb creating Makefile make gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin10.3.2 -I/usr/local/lib/ruby/1.8/i686-darwin10.3.2 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -D_XOPEN_SOURCE=1 -fno-common -pipe -fno-common -c porter.c porter.c:31:44: error: stdlib.h: No such file or directory porter.c:32:47: error: string.h: No such file or directory porter.c: In function ‘create_stemmer’: porter.c:85: warning: incompatible implicit declaration of built-in function ‘malloc’ porter.c: In function ‘setto’: porter.c:199: warning: incompatible implicit declaration of built-in function ‘memmove’ make: *** [porter.o] Error 1 Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/fast-stemmer-1.0.0 for inspection. Results logged to /usr/local/lib/ruby/gems/1.8/gems/fast-stemmer-1.0.0/ext/gem_make.out
ดูเหมือนว่าจะมีปัญหาพื้นฐานพอสมควรที่นี่! ฉันจะแก้ไขปัญหานี้ได้อย่างไร? ฉันใช้ Ruby 1.8.7 และ RubyGems 1.3.7 1.8.10
ขอบคุณล่วงหน้า.