ports collectionからphp5をインストールしたのですがエラーでインストールできてません
FreeNAS 9 – pkg-static: fstat() failed for(): No such file or directory
http://www.rootlinks.net/2013/11/17/freenas-9-pkg-static-fstat-failed-for-no-such-file-or-directory/
pkg-static: fstat() failed for(/usr/local/share/licenses/php5-5.4.21/catalog.mk): No such file or directory
portsパッケージを解析する技量もないので取り敢えずエラーから試行錯誤してみました
試しにエラーに表示されているpkg-staticを打つとpkgコマンドの表示がされました
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
root@vhost:/usr/ports/lang/php5 # pkg-static usage: pkg [-v] [-d] [-l] [-N] [-j <jail name or id>|-c <chroot path>] [-C <configuration file>] <command> [<args>] Global options supported: -d Increment debug level -j Execute pkg(1) inside a jail(8) -c Execute pkg(1) inside a chroot(8) -C Use the specified configuration file -l List available command and exit -v Display pkg(1) version -N Test if pkg(1) is activated and avoid auto-activation Commands supported: add Registers a package and installs it on the system annotate Add, modify or delete tag-value style annotations on packages audit Reports vulnerable packages autoremove Removes orphan packages backup Backs-up and restores the local package database check Checks for missing dependencies and database consistency clean Cleans old packages from the cache convert Convert database from/to pkgng create Creates software package distributions delete Deletes packages from the database and the system fetch Fetches packages from a remote repository help Displays help information info Displays information about installed packages install Installs packages from remote package repositories lock Locks package against modifications or deletion plugins Manages plugins and displays information about plugins query Queries information about installed packages register Registers a package into the local database remove Deletes packages from the database and the system repo Creates a package repository catalogue rquery Queries information in repository catalogues search Performs a search of package repository catalogues set Modifies information about packages in the local database ssh ssh packages to be used via ssh shell Opens a debug shell shlib Displays which packages link against a specific shared library stats Displays package database statistics unlock Unlocks a package, allowing modification or deletion update Updates package repository catalogues updating Displays UPDATING information for a package upgrade Performs upgrades of packaged software distributions version Displays the versions of installed packages which Displays which package installed a specific file For more information on the different commands see 'pkg help <command>'. root@vhost:/usr/ports/lang/php5 # pkg-static -v 1.1.3 |
どうもパッケージ管理に関係したエラーのような気がしました。このページを見つけてもしかしてdbのコンバートが必要なのかな
5.5. pkgng によるバイナリ package の管理
http://www.freebsd.org/doc/ja/books/handbook/pkgng-intro.html
試しにpkgのアップデートとdbコンバートを行ってみました
- pkgのアップデート
- pkg2ngの実行
pkgのバージョンは1.1.3でした
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
root@vhost:/usr/ports/lang/php5 # pkg -v 1.1.3 root@vhost:/usr/ports/lang/php5 # cd /usr/ports/ports-mgmt/pkg root@vhost:/usr/ports/ports-mgmt/pkg # make ===> License BSD accepted by the user => pkg-1.1.4.tar.xz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch http://files.etoilebsd.net/pkg/pkg-1.1.4.tar.xz pkg-1.1.4.tar.xz 100% of 1518 kB 232 kBps ===> Fetching all distfiles required by pkg-1.1.4_9 for building (snip) root@vhost:/usr/ports/ports-mgmt/pkg # make install ===> Staging for pkg-1.1.4_9 ===> Generating temporary packing list ===> external (install) ===> external/sqlite (install) ===> external/libyaml (install) ===> libpkg (install) install -C -o root -g wheel -m 444 libpkg.a /usr/ports/ports-mgmt/pkg/work/stage/usr/local/lib (snip) ====> Compressing man pages (compress-man) ===> Installing for pkg-1.1.4_9 ===> Checking if ports-mgmt/pkg already installed ===> An older version of ports-mgmt/pkg is already installed (pkg-1.1.3_1) You may wish to ``make deinstall'' and install this port again by ``make reinstall'' to upgrade it properly. If you really wish to overwrite the old port of ports-mgmt/pkg without deleting it first, set the variable "FORCE_PKG_REGISTER" in your environment or the "make install" command line. *** [check-already-installed] Error code 1 Stop in /usr/ports/ports-mgmt/pkg. *** [/usr/ports/ports-mgmt/pkg/work/.install_done.pkg._usr_local] Error code 1 Stop in /usr/ports/ports-mgmt/pkg. |
すでにpkg 1.1.3がインストールされているのでエラーになってしまいます
ここはメッセージにもあるように削除して再インストールします
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
root@vhost:/usr/ports/ports-mgmt/pkg # make deinstall ===> Deinstalling for ports-mgmt/pkg ===> Deinstalling Deinstallation has been requested for the following 1 packages: pkg-1.1.3_1 The deinstallation will free 5 MB [1/1] Deleting pkg-1.1.3_1... done root@vhost:/usr/ports/ports-mgmt/pkg # make reinstall ===> Installing for pkg-1.1.4_9 ===> Registering installation for pkg-1.1.4_9 Installing pkg-1.1.4_9... done If you are upgrading from the old package format, first run: # pkg2ng root@vhost:/usr/ports/ports-mgmt/pkg # pkg -v 1.1.4 |
1.1.4にアップデートされ古いパッケージ形式からアップデートするには最初にpkg2ngを実行しろとのメッセージが表示されています
1 2 |
root@vhost:/usr/ports/ports-mgmt/pkg # pkg2ng Converting packages from /var/db/pkg |
再度php5のインストールの実行です。いつものようにmake config, make, make test, make installを実行しました
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
root@vhost:/usr/ports/lang/php5 # make install ===> Staging for php5-5.4.21 ===> php5-5.4.21 depends on shared library: libpcre.so - found ===> php5-5.4.21 depends on shared library: libxml2.so - found ===> Generating temporary packing list Installing PHP CLI binary: /usr/ports/lang/php5/work/stage/usr/local/bin/ Installing PHP CLI man page: /usr/ports/lang/php5/work/stage/usr/local/man/man1/ Installing PHP FPM binary: /usr/ports/lang/php5/work/stage/usr/local/sbin/ Installing PHP FPM config: /usr/ports/lang/php5/work/stage/usr/local/etc/ Installing PHP FPM man page: /usr/ports/lang/php5/work/stage/usr/local/man/man8/ Installing PHP FPM status page: /usr/ports/lang/php5/work/stage/usr/local/share/php/fpm/ Installing PHP CGI binary: /usr/ports/lang/php5/work/stage/usr/local/bin/ Installing PHP CGI man page: /usr/ports/lang/php5/work/stage/usr/local/man/man1/ Installing build environment: /usr/ports/lang/php5/work/stage/usr/local/lib/php/build/ Installing header files: /usr/ports/lang/php5/work/stage/usr/local/include/php/ Installing helper programs: /usr/ports/lang/php5/work/stage/usr/local/bin/ program: phpize program: php-config Installing man pages: /usr/ports/lang/php5/work/stage/usr/local/man/man1/ page: phpize.1 page: php-config.1 ====> Compressing man pages (compress-man) ===> Staging rc.d startup script(s) ===> Installing for php5-5.4.21 ===> Checking if lang/php5 already installed ===> Registering installation for php5-5.4.21 Installing php5-5.4.21... done ===> SECURITY REPORT: This port has installed the following files which may act as network servers and may therefore pose a remote security risk to the system. /usr/local/bin/php /usr/local/bin/php-cgi /usr/local/sbin/php-fpm This port has installed the following startup scripts which may cause these network services to be started at boot time. /usr/local/etc/rc.d/php-fpm If there are vulnerabilities in these programs there may be a security risk to the system. FreeBSD makes no guarantee about the security of ports included in the Ports Collection. Please type 'make deinstall' to deinstall the port if this is a concern. For more information, and contact details about the security status of this software, see the following webpage: http://www.php.net/ |
エラーが無くなりました(^^v
1 2 3 4 5 6 7 8 9 10 |
root@vhost:/usr/ports/lang/php5 # ls -l /usr/local/include/php/ext/ total 71 drwxr-xr-x 3 root wheel 4 Nov 17 16:33 date drwxr-xr-x 3 root wheel 5 Nov 17 16:33 ereg drwxr-xr-x 2 root wheel 3 Nov 17 16:32 libxml drwxr-xr-x 2 root wheel 22 Nov 17 16:32 mysqlnd drwxr-xr-x 2 root wheel 3 Nov 17 16:32 pcre -rw-r--r-- 1 root wheel 0 Nov 17 16:33 php_config.h drwxr-xr-x 2 root wheel 13 Nov 17 16:32 spl drwxr-xr-x 2 root wheel 64 Nov 17 16:32 standard |