portsのpear-1.8.1をportupgradeでインストールしてみたのですが、一部のファイルがコピーされず、不完全な状態になるようです。
原因はあまり詳しく調べていませんが、
- 古いphp4をインストールしてあるマシンだった
- インターネット接続できない環境でmake installしていた。/usr/ports/distfiles/pear-1.8.1.tar.bz2はある
という状況で発生しました。
しかも嫌なことに、インストールが不完全だったのにもかかわらず、portsとしては、まったくエラーにはなっていません。表面上は、正常にインストールできたっぽい感じで、make installは完了します。
portupgradeで、pear-1.8.1へアップデートされるときのログ。
** Forcing upgrade of a held package: devel/pear
---> Upgrading 'pear-1.7.2' to 'pear-1.8.1' (devel/pear)
---> Building '/usr/ports/devel/pear'
===> Cleaning for pear-1.8.1
===> Extracting for pear-1.8.1
=> MD5 Checksum OK for pear-1.8.1.tar.bz2.
=> SHA256 Checksum OK for pear-1.8.1.tar.bz2.
===> Patching for pear-1.8.1
===> Applying FreeBSD patches for pear-1.8.1
===> Configuring for pear-1.8.1
---> Backing up the old version
---> Uninstalling the old version
---> Deinstalling 'pear-1.7.2'
pkg_delete: package 'pear-1.7.2' is required by these other packages
and may not be deinstalled (but I'll delete it anyway):
pear-HTML_Common-1.2.4
pear-HTML_Form-1.3.0
pear-HTML_Select-1.2.1
pear-HTML_Table-1.8.2
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 546 packages found (-1 +0) (...) done]
---> Installing the new version via the port
===> Installing for pear-1.8.1
===> pear-1.8.1 depends on file: /usr/local/include/php/main/php.h - found
===> pear-1.8.1 depends on file: /usr/local/lib/php/20020429/pcre.so - found
===> pear-1.8.1 depends on file: /usr/local/lib/php/20020429/xml.so - found
===> Generating temporary packing list
Bootstrapping Installer...................
Bootstrapping PEAR.php............(local) ok
Bootstrapping Archive/Tar.php............(local) ok
Bootstrapping Console/Getopt.php............(local) ok
Extracting installer..................
Using local package: PEAR.............ok
Using local package: Structures_Graph....ok
Preparing installer..................
Updating channel "doc.php.net"
Channel "doc.php.net" is not responding over http://, failed with message: Connection to `doc.php.net:80' failed: Invalid argument
Trying channel "doc.php.net" over https:// instead
Cannot retrieve channel.xml for channel "doc.php.net" (Connection to `doc.php.net:443' failed: Invalid argument)
Updating channel "pear.php.net"
Channel "pear.php.net" is not responding over http://, failed with message: Connection to `pear.php.net:80' failed: Invalid argument
Trying channel "pear.php.net" over https:// instead
Cannot retrieve channel.xml for channel "pear.php.net" (Connection to `pear.php.net:443' failed: Invalid argument)
Updating channel "pecl.php.net"
Channel "pecl.php.net" is not responding over http://, failed with message: Connection to `pecl.php.net:80' failed: Invalid argument
Trying channel "pecl.php.net" over https:// instead
Cannot retrieve channel.xml for channel "pecl.php.net" (Connection to `pecl.php.net:443' failed: Invalid argument)
Installing selected packages..................
Installing bootstrap package: PEAR...................warning: pear/PEAR requires package "pear/Archive_Tar" (recommended version 1.3.3)
warning: pear/PEAR requires package "pear/Structures_Graph" (recommended version 1.0.2)
warning: pear/PEAR requires package "pear/Console_Getopt" (recommended version 1.2.3)
warning: pear/PEAR requires package "pear/XML_Util" (recommended version 1.2.1)
install ok: channel://pear.php.net/PEAR-1.8.1
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
Installing bootstrap package: Structures_Graph.......XML Error: 'not well-formed (invalid token)' on line '10'
Installing local package: Archive_Tar-stable.........install ok: channel://pear.php.net/Archive_Tar-1.3.3
Installing local package: Console_Getopt-stable.......install ok: channel://pear.php.net/Console_Getopt-1.2.3
===> Registering installation for pear-1.8.1
===> Cleaning for pear-1.8.1
---> Cleaning out obsolete shared libraries
このあとで、pear-HTML_Commonもportupgradeしようとしたら、こんなエラーが出ました。
Warning: sortpackagesforinstall(Structures/Graph.php): failed to open stream: No such file or directory in PEAR/Downloader.php on line 1217
Warning: sortpackagesforinstall(Structures/Graph.php): failed to open stream: No such file or directory in /usr/local/share/pear/PEAR/Downloader.php on line 1217
Fatal error: sortpackagesforinstall(): Failed opening required 'Structures/Graph.php' (include_path='/usr/local/share/pear') in /usr/local/share/pear/PEAR/Downloader.php on line 1217
*** Error code 255
どうやら、Structures/Graph.phpというファイルが見つけられていないようで、実際、本当にGraph.phpがありません。
さきほどのpearがインストールされるときのログをじっくりと見ると
Installing bootstrap package: Structures_Graph.......XML Error: 'not well-formed (invalid token)' on line '10'
というエラーが出ていますが、このせいで、Structures_Graphがインストールされなかった、ということらしいです。
Structures_Graph-1.0.2の中を見てみると、package.xmlの<name>のところに、非ASCII文字が入っているのが原因で、
XML Error: 'not well-formed (invalid token)' on line '10'
が出ているようでした。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0">
<package version="1.0" packagerversion="1.5.0">
<name>Structures_Graph</name>
<summary>Graph datastructure manipulation library</summary>
<description>Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed
and undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing
as well as for characteristic extraction from the graph topology.
</description>
<maintainers>
<maintainer>
<user>sergiosgc</user>
<name>Sシォrgio Carvalho</name>
この部分を書き換えて(なんとなくライセンス違反な感じがしないでもない)、Structures_Graph-1.0.2.tgzを作って、pear install -O Structures_Graph-1.0.2.tgz とやってみたんですが、なぜかうまくいかなかったので、手でファイルをコピーしちゃいました・・・
php4のXMLは国際化への対応が不完全ってことでしょうか?
0 件のコメント:
コメントを投稿