
Ubuntu日本語フォーラム
ログインしていません。
webサーバー(ubuntu serverEdition ver.9.04 )にbbpressを入れようと試みています.タイトルの通りbb-admin/install.phpにアクセスするとERROR: bbPress requires The MySQL PHP extension と表示されてしまいます.
phpのバージョンはver.5.2.6
MySQLのバージョンはver.5.0.75
です.ご存知の方がいらっしゃればご教示ください.
オフライン
libapache2-mod-php5 とかphp5-mysql とかの依存しそうなパッケージは入っていますか?
オフライン
回答ありがとうございます.
libapache2-mod-php5 をインストールする際に以下の様に言われました
====================================================
Reading package lists...
Building dependency tree...
Reading state information...
libapache2-mod-php5 is already the newest version.
libapache2-mod-php5 set to manually installed.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
php5-mysqli: Depends: phpapi-20051025 but it is not installable
Depends: php5-mysql (= 5.1.2-1ubuntu3.14) but it is not going to be installed
Depends: php5-common (= 5.1.2-1ubuntu3.14) but 5.2.6.dfsg.1-3ubuntu4.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
===================================================================
php5-mysqlの場合は以下の様です
===================================================================
Reading package lists...
Building dependency tree...
Reading state information...
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
php5-mysql: Conflicts: php5-mysqli but 5.1.2-1ubuntu3.14 is to be installed
php5-mysqli: Depends: phpapi-20051025 but it is not installable
Depends: php5-mysql (= 5.1.2-1ubuntu3.14) but 5.2.6.dfsg.1-3ubuntu4.1 is to be installed
Depends: php5-common (= 5.1.2-1ubuntu3.14) but 5.2.6.dfsg.1-3ubuntu4.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
===================================================================
まとめますと
phpapi-20051025 → インストール不可能
php5-mysql → インストールされているバージョンより古いものが必要
php5-common → インストールされているバージョンより古いものが必要
php5-mysqli → php5-mysqlと衝突している
古いバージョンを指定してインストールすることはできるのでしょうか?
また,衝突している場合はどうしたらいいのでしょうか?
オフライン
falcon2 による投稿:
まとめますと
phpapi-20051025 → インストール不可能
php5-mysql → インストールされているバージョンより古いものが必要
php5-common → インストールされているバージョンより古いものが必要
php5-mysqli → php5-mysqlと衝突している
古いバージョンを指定してインストールすることはできるのでしょうか?
また,衝突している場合はどうしたらいいのでしょうか?
えっと、色々調べてみたんですが、現在お使いのubuntuのバージョンは何でしょう?
端末で
cat /etc/lsb-release
の出力結果を教えてください。
php5-mysqliやphp5が5.1.2とかな数字が出てきているということはdapperからのupgradeが適切にできていないままなのだとは推測します。
そのため端末上で
sudo apt-get update
sudo apt-get -f install
を順に実行してシステムの状態を少なくとも適切な状況にする必要があると思います。
たぶん依存関係が壊れた状態ですので途中で止まるとは思いますが、その時のエラーメッセージなどを貼り付けられると良いかと思います。
少なくともパッケージシステム上のパッケージのみで構成する場合は、パッケージが衝突していたりしていても解決できるはずですので、土台をしっかりさせましょう。
その後
sudo apt-get remove php5-mysqli
sudo apt-get install libapache2-mod-php5 php5-mysql
を実行してみてください。
オフライン
ubuntuは9.04です.
cat /etc/lsb-releaseの結果です
==============================
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
==============================
sudo apt-get updateの結果です
==============================
Err http://ftp.ecc.u-tokyo.jp jaunty-updates Release.gpg
Could not resolve 'ftp.ecc.u-tokyo.jp'
Err http://ftp.ecc.u-toyko.ac.jp jaunty-updates Release.gpg
Could not resolve 'ftp.ecc.u-toyko.ac.jp'
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty Release.gpg
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty-updates Release.gpg
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty Release
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty-updates Release
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty/main Packages
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty/restricted Packages
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty/main Sources
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty/restricted Sources
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty/universe Packages
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty/universe Sources
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty/multiverse Packages
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty/multiverse Sources
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty-updates/main Packages
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty-updates/restricted Packages
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty-updates/main Sources
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty-updates/restricted Sources
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty-updates/universe Sources
Hit http://ftp.ecc.u-tokyo.ac.jp jaunty-updates/multiverse Sources
Hit http://security.ubuntu.com jaunty-security Release.gpg
Hit http://security.ubuntu.com jaunty-security Release
Hit http://security.ubuntu.com jaunty-security/main Packages
Hit http://security.ubuntu.com jaunty-security/restricted Packages
Hit http://security.ubuntu.com jaunty-security/main Sources
Hit http://security.ubuntu.com jaunty-security/restricted Sources
Hit http://security.ubuntu.com jaunty-security/universe Packages
Hit http://security.ubuntu.com jaunty-security/universe Sources
Hit http://security.ubuntu.com jaunty-security/multiverse Packages
Hit http://security.ubuntu.com jaunty-security/multiverse Sources
Reading package lists...
W: Failed to fetch http://ftp.ecc.u-tokyo.jp/ubuntu/dists/jaunty-updates/Release.gpg Could not resolve 'ftp.ecc.u-tokyo.jp'
W: Failed to fetch http://ftp.ecc.u-toyko.ac.jp/ubuntu/dists/jaunty-updates/Release.gpg Could not resolve 'ftp.ecc.u-toyko.ac.jp'
W: Some index files failed to download, they have been ignored, or old ones used instead.
W: You may want to run apt-get update to correct these problems
==============================
sudo apt-get remove php5-mysqliの結果です
==============================
Reading package lists...
Building dependency tree...
Reading state information...
Package php5-mysqli is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
=================================
sudo apt-get install libapache2-mod-php5 php5-mysqlの結果です
=================================
Reading package lists...
Building dependency tree...
Reading state information...
libapache2-mod-php5 is already the newest version.
php5-mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
================================
オフライン
↑ですが/etc/apt/source.listの東京大学のミラーサーバーのURLの記述にミスが合ったので直しました.そうすると
sudo apt-get update はうまくいきました.
しかしまだERROR: bbPress requires The MySQL PHP extension と表示されます.
phpの情報を表示させたphpinfo.phpには以下の様にあり
===============================
略
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
略
===============================
php Extensionはインストール出来ている模様です.
オフライン
falcon2 による投稿:
=================================
sudo apt-get install libapache2-mod-php5 php5-mysqlの結果です
=================================
Reading package lists...
Building dependency tree...
Reading state information...
libapache2-mod-php5 is already the newest version.
php5-mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
================================
44パッケージも未upgradeというのも気になりますが、まずbbpress自体で必要になるphp関連のものは把握されているでしょうか?
個人的にはphpを扱わないという主義wなので、とりあえずWebページを確認しましたが細かい記載がないためphp5-*等でどれが必要か判断つきませんでした。
# wordpressパッケージの依存するパッケージで最低限必要...という形でも良いのかもしれないけど、plugin関係でどうなるか...。
# まずは mysql-client-5.0 が足りないとかなのかな...? wordpressパッケージそのものをインストールすると解決するのかな...?
確認・質問ですが、
1)phpinfo 関数を呼び出すページで確認した際、mysql関係が有効になっていることは確認できますか?
2)どんな状況でエラーが発生しますか?
3)44パッケージの未upgradeの中でapache/php/mysql関係のものは存在していませんか?
オフライン
以下の様になっています
1)→phpinfoで出力した中でmySQLに関係ありそうな部分は以下です.
===================================================================
additional .ini files parsed /etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_mysql.ini
===================================================================
2)→ダウンロードしてきたBBPressのファイル群の中でbb-config.phpというファイル以外をアップした場合は設定のページが表示されますがやはりそのページにはbb-config.phpがないといわれます.
そして,bb-config.phpファイルをアップして同じページを見るとERROR: bbPress requires The MySQL PHP extension と表示されてしまいます.
そのbb-config.phpの内容は以下の様になっています.
===================================================================
<?php
/**
* The base configurations of bbPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys and bbPress Language. You can get the MySQL settings from your
* web host.
*
* This file is used by the installer during installation.
*
* @package bbPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for bbPress */
define( 'BBDB_NAME', 'bbpress' );
/** MySQL database username */
define( 'BBDB_USER', 'webadm' );
/** MySQL database password */
define( 'BBDB_PASSWORD', 'passwd' );
/** MySQL hostname */
define( 'BBDB_HOST', 'localhost' );
/** Database Charset to use in creating database tables. */
define( 'BBDB_CHARSET', 'utf8' );
/** The Database Collate type. Don't change this if in doubt. */
define( 'BBDB_COLLATE', '' );
/**#@+
* Authentication Unique Keys.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/bbpress/ WordPress.org secret-key service}
*
* @since 1.0
*/
define( 'BB_AUTH_KEY', 'put your unique phrase here' );
define( 'BB_SECURE_AUTH_KEY', 'put your unique phrase here' );
define( 'BB_LOGGED_IN_KEY', 'put your unique phrase here' );
define( 'BB_NONCE_KEY', 'put your unique phrase here' );
/**#@-*/
/**
* bbPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$bb_table_prefix = 'bb_';
/**
* bbPress Localized Language, defaults to English.
*
* Change this to localize bbPress. A corresponding MO file for the chosen
* language must be installed to a directory called "my-languages" in the root
* directory of bbPress. For example, install de.mo to "my-languages" and set
* BB_LANG to 'de' to enable German language support.
*/
define( 'BB_LANG', '' );
?>
===================================================================
3)→すみません 未upgradeのパッケージの確認の仕方(コマンド?)が分かりません
オフライン
falcon2 による投稿:
2)→ダウンロードしてきたBBPressのファイル群の中でbb-config.phpというファイル以外をアップした場合は設定のページが表示されますがやはりそのページにはbb-config.phpがないといわれます.
そして,bb-config.phpファイルをアップして同じページを見るとERROR: bbPress requires The MySQL PHP extension と表示されてしまいます.
手元(hardy)で試しましたが、php5-mysql パッケージが入っていれば適切にphp5のモジュールとしてロードされます。
phpinfo.phpというファイルでphpinfo関数で状況が見られるようですが、
<?php phpinfo(INFO_MODULES); ?>
のようにモジュールだけを表示させて、MySQLのモジュールが組み込まれているか確認してみてください。
また端末で
dpkg -l \*php5\*
を実行した結果と、/etc/php5/apache2/php.iniをいじったかどうか(+いじっていたらその内容も)教えてください。
なおbb-config.phpファイルについては、一番最初のインストーラページから生成されたほうが良いと思います。
DBに接続できないなどのチェックもされているようですので...。
falcon2 による投稿:
3)→すみません 未upgradeのパッケージの確認の仕方(コマンド?)が分かりません
synapticでは左ペインの「状態(T)」のボタンを押すと未アップグレードとか出てくるんじゃないかなぁ...。(普段使わないのがバレバレ...
aptを使うとすれば、
sudo apt-get -s upgrade
とかでhold設定されていなければ、何がupgradeされるかとか表示してもらえるはずです。
オフライン
回答ありがとうございます.
自分の中でどこをどういじくったか分からなくなったのでサーバーを再セットアップしLAMP環境が簡単に導入できるXAMPPというアプリを導入しましたら問題なくインストールできました.
本質的な解決こそできませんでしたがいい勉強になりました.丁寧に回答いただき本当にありがとうございました.
オフライン