はじめて emerge -u system してみた。
しかし、やっぱり、エラー発生。まあ、いつものこと。ブログに書くネタができたと思えばよし。
Linuxを使いはじめて数年になるが、最近になってやっと、「一発目でうまくいくことはないだろう」という悟りを開けた気がする。
■ エラー内容
----------------------------------------------------------------------
!!! ERROR: sys-libs/db-4.2.52_p4-r2 failed.
Call stack:
ebuild.sh, line 1614: Called dyn_compile
ebuild.sh, line 971: Called qa_call 'src_compile'
environment, line 4703: Called src_compile
db-4.2.52_p4-r2.ebuild, line 101: Called die
!!! configure failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/sys-libs/db-4.2.52_p4-r2/temp/build.log'.
!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.5 CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.5.0.09"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""
and of course, the ohttp://utput of emerge --info
----------------------------------------------------------------------
うーん、javaまわりか?
■以下の情報を発見
http://www.archivesat.com/Gentoo_Linux_users/thread2810188.htmコメント通り、 java-check-enviroment を実行してみる
----------------------------------------------------------------------
$ java-check-environment
* === Java Environment Checker ===
* The purpose of this script is to check the sanity of your Java Environment.
* We have significantly changed and improved the way Java is handled in many respects.
* Please refer to http://www.gentoo.org/proj/en/java/java-upgrade.xml for details
* Checking vm_environment_files ... [ ok ]
* Checking user_settings ... [ ok ]
* Checking generation_1_system_vm ...
* No Generation-1 System VM is set! (no /etc/env.d/20java)
* It doesn't look like java-config-1 sees any installed VMs.
* It is most likely because you don't have a 1.4 JDK installed
* This is required for generation-1 to work properly.
* You will want to emerge =virtual/jdk-1.4* [ !! ]
* Some problems were found. Please follow the instructions above, and rerun java-check-environment
----------------------------------------------------------------------
JDK1.4がいるんですか〜?? 1.5入ってるけど、それ使えないのかな?
■関係ありそうな設定ファイルをいろいろ見てみる
----------------------------------------------------------------------
$ cat /etc/env.d/20java-config
MANPATH=/etc/java-config/system-vm/man/
CONFIG_PROTECT_MASK="/etc/java-config/vms/ /etc/env.d/java/"
$ ls /etc/java-config-2
build/ current-system-vm@ virtuals
$ ls -l /etc/java-config-2/current-system-vm
lrwxrwxrwx 1 root root 24 2006-12-25 21:06 /etc/java-config-2/current-system-vm -> /usr/lib/jvm/sun-jdk-1.5
$ls -l /usr/lib/jvm/sun-jdk-1.5
lrwxrwxrwx 1 root root 21 2007-01-23 01:56 /usr/lib/jvm/sun-jdk-1.5 -> /opt/sun-jdk-1.5.0.09
$ ls -1 /opt |grep jdk
jdk1.5.0_11/
----------------------------------------------------------------------
どうやら、インストールしているJDKへのシンボリックリンクが正しく設定されていないようだ。JDK1.5はemergeではなく手動でインストールした。
シンボリックリンクの変更で解決を試みる。
----------------------------------------------------------------------
# ln -sf /opt/jdk1.5.0_11 /usr/lib/jvm/sun-jdk-1.5
一応、emergeのエラーメッセージへの対策として、以下もやっておく。
# ln -s /opt/jdk1.5.0_11 /opt/sun-jdk-1.5.0.09
----------------------------------------------------------------------
■再チャレンジ
# emerge -u system
* IMPORTANT: 51 config files in '/etc' need updating.
* Type emerge --help config to learn how to update config files.
うまくいった!!
■/etc以下の更新
# etc-update
33個も更新があるじゃないか(泣)
「51 config files in '/etc' need updating.」とファイル数が違うがいいのか?
差分を見ると、コメントの細かい内容とか、スクリプトの文法の修正とかあって、開発者の苦労と性格がわかりそうですね。