無法在 Ubuntu 12.04 上啟動 MySQL5.5 - “dpkg:依賴問題”

無法在 Ubuntu 12.04 上啟動 MySQL5.5 - “dpkg:依賴問題”

這似乎是 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

相關內容