Linux
無法使用 aptitude 安裝 MYSQL…誰能告訴我為什麼?
在此之後它只是停止並凍結。
The following packages will be upgraded: libmysqlclient15off mysql-client mysql-client-5.0 mysql-common 4 packages upgraded, 4 newly installed, 0 to remove and 49 not upgraded. Need to get 38.0MB of archives. After unpacking 91.1MB will be used. Do you want to continue? [Y/n/?] y Writing extended state information... Done Get:1 http://archive.ubuntu.com jaunty-updates/main mysql-common 5.1.30really5.0 .75-0ubuntu10.2 [62.9kB] Get:2 http://archive.ubuntu.com jaunty-updates/main mysql-client 5.1.30really5.0 .75-0ubuntu10.2 [55.0kB] Get:3 http://archive.ubuntu.com jaunty-updates/main libmysqlclient15off 5.1.30re ally5.0.75-0ubuntu10.2 [1878kB] Get:4 http://archive.ubuntu.com jaunty-updates/main mysql-client-5.0 5.1.30reall y5.0.75-0ubuntu10.2 [8292kB] Get:5 http://archive.ubuntu.com jaunty-updates/main mysql-server-core-5.0 5.1.30 really5.0.75-0ubuntu10.2 [3534kB] Get:6 http://archive.ubuntu.com jaunty-updates/main mysql-server-5.0 5.1.30reall y5.0.75-0ubuntu10.2 [24.0MB] Get:7 http://archive.ubuntu.com jaunty/main libhtml-template-perl 2.9-1 [65.8kB] Get:8 http://archive.ubuntu.com jaunty-updates/main mysql-server 5.1.30really5.0 .75-0ubuntu10.2 [57.2kB] Fetched 38.0MB in 3s (10.8MB/s) Preconfiguring packages ... (Reading database ... 17211 files and directories currently installed.) Preparing to replace mysql-common 5.1.30really5.0.75-0ubuntu10 (using .../mysql- common_5.1.30really5.0.75-0ubuntu10.2_all.deb) ... Unpacking replacement mysql-common ... Preparing to replace mysql-client 5.1.30really5.0.75-0ubuntu10 (using .../mysql- client_5.1.30really5.0.75-0ubuntu10.2_all.deb) ... Unpacking replacement mysql-client ... Preparing to replace libmysqlclient15off 5.1.30really5.0.75-0ubuntu10 (using ... /libmysqlclient15off_5.1.30really5.0.75-0ubuntu10.2_amd64.deb) ... Unpacking replacement libmysqlclient15off ... Preparing to replace mysql-client-5.0 5.1.30really5.0.75-0ubuntu10 (using .../my sql-client-5.0_5.1.30really5.0.75-0ubuntu10.2_amd64.deb) ... Unpacking replacement mysql-client-5.0 ... Selecting previously deselected package mysql-server-core-5.0. Unpacking mysql-server-core-5.0 (from .../mysql-server-core-5.0_5.1.30really5.0. 75-0ubuntu10.2_amd64.deb) ... Setting up mysql-common (5.1.30really5.0.75-0ubuntu10.2) ... Selecting previously deselected package mysql-server-5.0. (Reading database ... 17290 files and directories currently installed.) Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.1.30really5.0.75-0ubuntu 10.2_amd64.deb) ... * Stopping MySQL database server mysqld [ OK ] Selecting previously deselected package libhtml-template-perl. Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.9-1_all.deb) . .. Selecting previously deselected package mysql-server. Unpacking mysql-server (from .../mysql-server_5.1.30really5.0.75-0ubuntu10.2_all .deb) ... * Stopping MySQL database server mysqld [ OK ] Setting up libmysqlclient15off (5.1.30really5.0.75-0ubuntu10.2) ... Setting up mysql-client-5.0 (5.1.30really5.0.75-0ubuntu10.2) ... Setting up mysql-client (5.1.30really5.0.75-0ubuntu10.2) ... Setting up mysql-server-core-5.0 (5.1.30really5.0.75-0ubuntu10.2) ... Setting up mysql-server-5.0 (5.1.30really5.0.75-0ubuntu10.2) ... * Stopping MySQL database server mysqld [ OK ] * /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debi an.gz * Starting MySQL database server mysqld [fail] invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing mysql-server-5.0 (--configure): subprocess post-installation script returned error exit status 1 Setting up libhtml-template-perl (2.9-1) ... dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.0; however: Package mysql-server-5.0 is not configured yet. dpkg: error processing mysql-server (--configure): dependency problems - leaving unconfigured Processing triggers for libc6 ... No apport report written because the error message indicates its a followup erro r from a previous failure. ldconfig deferred processing now taking place Errors were encountered while processing: mysql-server-5.0 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up mysql-server-5.0 (5.1.30really5.0.75-0ubuntu10.2) ... * Stopping MySQL database server mysqld [ OK ] * /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debi an.gz * Starting MySQL database server mysqld [ OK ] /etc/init.d/mysql: line 115: /etc/mysql/debian-start: No such file or directory invoke-rc.d: initscript mysql, action "start" failed.
因為上次刪除軟體包時,您只是刪除了它們,沒有清除它們,然後手動刪除了配置文件。所以 dpkg 認為你不想要一個預設的配置文件(因為你刪除了它),所以它沒有安裝新的,MySQL 哭了。
清除所有與 mysql 相關的包,然後重試。
- 完全取出包裝
- 清理
apt-get
。- 刪除系統上仍然從您拙劣的安裝中遺留下來的所有內容。
apt-get install libmysqlclient15off mysql-client mysql-client-5.0 mysql-common