読者です 読者をやめる 読者になる 読者になる

rb-rubygemsやrb-mecabをMacPortsからインストールできない

rb-rubygemsMacPortsからインストールすると以下のエラーがでてインストールできない.これは困った.

% sudo port install rb-rubygems                                                                                                                  
Password:
--->  Configuring rb-rubygems
--->  Building rb-rubygems with target setup
--->  Staging rb-rubygems into destroot
Error: Target org.macports.destroot returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/rubygems-0.9.4" && /opt/local/bin/ruby -rvendor-specific setup.rb install " returned error 1
Command output: install rdoc_command.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/commands
install search_command.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/commands
install sources_command.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/commands
install specification_command.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/commands
install uninstall_command.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/commands
install unpack_command.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/commands
install update_command.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/commands
<--- lib/rubygems/commands
---> lib/rubygems/digest
mkdir -p /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/digest
install digest_adapter.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/digest
install md5.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/digest
install sha1.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/digest
install sha2.rb /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/destroot/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/digest
<--- lib/rubygems/digest
<--- lib/rubygems
<--- lib
WARNING:  no author specified
WARNING:  no email specified
WARNING:  no homepage specified
WARNING:  no rubyforge_project specified
WARNING:  RDoc will not be generated (has_rdoc == false)
WARNING:  deprecated autorequire specified
hook /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-rubygems
/work/rubygems-0.9.4/./post-install.rb failed:
wrong number of arguments (3 for 0)
Try 'ruby setup.rb --help' for detailed usage.
  Successfully built RubyGem
  Name: sources
  Version: 0.0.1
  File: sources-0.0.1.gem

Error: Status 1 encountered during processing.

またrb-mecabもインストールしようとしたらエラーがでてインストールできない.

% sudo port install rb-mecab
--->  Fetching rb-mecab
--->  Verifying checksum(s) for rb-mecab
--->  Extracting rb-mecab
--->  Configuring rb-mecab
--->  Building rb-mecab with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_ruby_rb-mecab
/work/mecab-ruby-0.96" && make all RUBY="/opt/local/bin/ruby -rvendor-specific" " returned error 2
Command output: I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.1.0 -I. -DHAVE_MECAB_H -I/opt/local/include -fno-common -O2  -fno-common -pipe -fno-common -I/opt/local/include   -c MeCab_wrap.cpp
make: I.: Command not found
make: [MeCab_wrap.o] Error 127 (ignored)
cc -dynamic -bundle -undefined suppress -flat_namespace -o MeCab.bundle MeCab_wrap.o -L"." -L"/opt/local/lib" -L. -L/opt/local/lib    -lruby -lstdc++ -lmecab  -lpthread -ldl -lobjc  
i686-apple-darwin9-gcc-4.0.1: MeCab_wrap.o: No such file or directory
make: *** [MeCab.bundle] Error 1

Error: Status 1 encountered during processing.

最悪,MacPortsを再インストールするか,Macをリカバリするか...