![Ubuntu 12.04 で MySQL5.5 を起動できない - 「dpkg: 依存関係の問題」](https://rvso.com/image/1337815/Ubuntu%2012.04%20%E3%81%A7%20MySQL5.5%20%E3%82%92%E8%B5%B7%E5%8B%95%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84%20-%20%E3%80%8Cdpkg%3A%20%E4%BE%9D%E5%AD%98%E9%96%A2%E4%BF%82%E3%81%AE%E5%95%8F%E9%A1%8C%E3%80%8D.png)
これは12.04でよくある問題のようです。このスレッド含む:
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get remove --purge mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
sudo apt-get install mysql-server
まだ同じ古いエラーが発生します。MySql5.5 のインストール/起動は次のようになります。
apt-get install -f mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up mysql-server-5.5 (5.5.24-0ubuntu0.12.04.1) ...
120907 21:37:15 [Note] Plugin 'FEDERATED' is disabled.
120907 21:37:15 InnoDB: The InnoDB memory heap is disabled
120907 21:37:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120907 21:37:15 InnoDB: Compressed tables use zlib 1.2.3.4
120907 21:37:15 InnoDB: Initializing buffer pool, size = 128.0M
120907 21:37:15 InnoDB: Completed initialization of buffer pool
120907 21:37:15 InnoDB: highest supported file format is Barracuda.
120907 21:37:15 InnoDB: Waiting for the background threads to start
120907 21:37:16 InnoDB: 1.1.8 started; log sequence number 154164236
120907 21:37:16 InnoDB: Starting shutdown...
120907 21:37:16 InnoDB: Shutdown completed; log sequence number 154164236
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.5
mysql-server
さらに、dpkg-reconfigure mysql-server-5.5
返品/usr/sbin/dpkg-reconfigure: mysql-server-5.5 is broken or not fully installed
ここでの最終的な目標は、GitoriousをインストールしてRedmineで動作するように構成することですが、問題はUbuntu 12.04とMySql5.5に限定されていると思います。
答え1
私の場合、andrewcaveman の解決策が効果を発揮しました。
私も同じ問題を抱えていました。apt-get clean、autoclean、remove、apt-get install mysql-server-5.5 を試しましたが、同じエラーが繰り返し発生しました。
もう一度すべてを削除して再試行しましたが、問題は解決しませんでした。
これは私にとってはうまくいきましたが、私はアップグレードではなくインストールを行っていたので、既存のデータベースについては気にしていませんでした。
もう一度、すべての mysql アプリケーションを削除し、/var/lib/mysql ディレクトリを削除しました。そこに既存のデータベースがある場合は、失われることに注意してください。別の場所に移動することをお勧めします。
そのディレクトリを削除した後、再度インストールすると、完璧に動作しました。つまり、/var/lib/mysql ディレクトリ内の何かが問題だったということです。これで問題が解決するかどうか確認してください。
ソース:http://ubuntuforums.org/showpost.php?p=12362816&postcount=2