FreeImage.h: No such file or directory

问题
-- create_table(:attachments, {:force=>true})
   -> 1.4809s
-- create_table(:file_attachments, {:force=>true})
   -> 5.7602s
-- create_table(:image_science_attachments, {:force=>true})
   -> 1.3107s
-- create_table(:mini_magick_attachments, {:force=>true})
   -> 0.7811s
-- create_table(:mini_magick_attachments, {:force=>true})
   -> 12.5345s
-- create_table(:orphan_attachments, {:force=>true})
   -> 3.4389s
-- create_table(:minimal_attachments, {:force=>true})
   -> 1.2690s
-- create_table(:db_files, {:force=>true})
   -> 0.6987s
-- create_table(:s3_attachments, {:force=>true})
   -> 1.3025s
-- initialize_schema_migrations_table()
   -> 0.0032s
-- assume_migrated_upto_version(0)
   -> 0.0024s
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:2:23: error: FreeImage.h: No such file or directory
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c: In function ‘unload’:
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:8: error: ‘FIBITMAP’ undeclared (first use in this function)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:8: error: (Each undeclared identifier is reported only once
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:8: error: for each function it appears in.)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:8: error: ‘bitmap’ undeclared (first use in this function)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:8: error: expected expression before ‘)’ token
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c: At top level:
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:16: error: expected ‘)’ before ‘*’ token
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:25: error: expected declaration specifiers or ‘...’ before ‘FIBITMAP’
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:25: error: expected declaration specifiers or ‘...’ before ‘FIBITMAP’
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c: In function ‘copy_icc_profile’:
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:26: error: ‘FREE_IMAGE_FORMAT’ undeclared (first use in this function)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:26: error: expected ‘;’ before ‘fif’
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:27: error: ‘fif’ undeclared (first use in this function)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:27: error: ‘FIF_PNG’ undeclared (first use in this function)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:28: error: ‘FIICCPROFILE’ undeclared (first use in this function)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:28: error: ‘profile’ undeclared (first use in this function)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:28: error: ‘from’ undeclared (first use in this function)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:30: error: ‘to’ undeclared (first use in this function)
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c: At top level:
/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c:36: error: expected ‘)’ before ‘fif’
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb: In function ‘with_image’:
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:146: error: ‘FREE_IMAGE_FORMAT’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:146: error: expected ‘;’ before ‘fif’
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:148: error: ‘fif’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:149: error: ‘FIF_UNKNOWN’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:151: error: ‘FIBITMAP’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:151: error: ‘bitmap’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:153: error: ‘FIF_JPEG’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:153: error: ‘JPEG_ACCURATE’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb: In function ‘with_crop’:
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:168: error: ‘FIBITMAP’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:168: error: ‘copy’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:170: error: ‘bitmap’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:170: error: expected expression before ‘)’ token
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:173: error: too many arguments to function ‘copy_icc_profile’
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb: In function ‘height’:
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:178: error: ‘FIBITMAP’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:178: error: ‘bitmap’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:178: error: expected expression before ‘)’ token
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb: In function ‘width’:
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:186: error: ‘FIBITMAP’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:186: error: ‘bitmap’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:186: error: expected expression before ‘)’ token
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb: In function ‘resize’:
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:198: error: ‘FIBITMAP’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:198: error: ‘bitmap’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:198: error: expected expression before ‘)’ token
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:199: error: ‘image’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:199: error: ‘FILTER_CATMULLROM’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:201: error: too many arguments to function ‘copy_icc_profile’
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb: In function ‘save’:
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:209: error: ‘FREE_IMAGE_FORMAT’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:209: error: expected ‘;’ before ‘fif’
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:210: error: ‘fif’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:210: error: ‘FIF_UNKNOWN’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:212: error: ‘FIBITMAP’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:212: error: ‘bitmap’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:212: error: expected expression before ‘)’ token
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:213: error: ‘FIF_JPEG’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:213: error: ‘JPEG_QUALITYSUPERB’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:214: error: ‘FIF_PNG’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb: In function ‘Init_Inline_ImageScience_aa58’:
/usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:235: error: ‘FreeImageErrorHandler’ undeclared (first use in this function)
/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.8.1/lib/inline.rb:589:in `build': error executing "gcc -shared   -fPIC -O2 -fno-stack-protector -mpreferred-stack-boundary=2   -I /usr/local/lib/ruby/1.8/i686-linux  -I /usr/local/include -L/usr/local/lib -o \"/home/agideo/.ruby_inline/Inline_ImageScience_aa58.so\" \"/home/agideo/.ruby_inline/Inline_ImageScience_aa58.c\" -lfreeimage -lstdc++ ": 256 (CompilationError)
Renamed /home/agideo/.ruby_inline/Inline_ImageScience_aa58.c to /home/agideo/.ruby_inline/Inline_ImageScience_aa58.c.bad
        from /usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.8.1/lib/inline.rb:819:in `inline'
        from /usr/local/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:84
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:510:in `require'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:510:in `require'
        from /home/agideo/.cruise/projects/f22/work/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb:1
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:510:in `require'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:510:in `require'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:102:in `require_or_load'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:261:in `load_missing_constant'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:468:in `const_missing'
        from /home/agideo/.cruise/projects/f22/work/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:92:in `const_get'
        from /home/agideo/.cruise/projects/f22/work/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:92:in `has_attachment'
        from /home/agideo/.cruise/projects/f22/work/vendor/plugins/attachment_fu/test/fixtures/attachment.rb:90
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:510:in `require'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
        from /home/agideo/.cruise/projects/f22/work/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:510:in `require'
        from /home/agideo/.cruise/projects/f22/work/vendor/plugins/attachment_fu/test/test_helper.rb:141
        from basic_test.rb:1:in `require'
        from basic_test.rb:1


解决
http://lists.radiantcms.org/pipermail/radiant/2007-July/005691.html
http://www.urbanpuddle.com/articles/2008/01/22/install-freeimage-imagescience-on-ubuntu-gutsy

你可能感兴趣的:(C#,Ruby,Rails,ActiveRecord,rubygems)