我在Raspberry Pi上運行lighttpd web服務器,我試圖添加php和mysql支持。我目前正試圖安裝mysql服務器用命令Raspbian - 嘗試安裝mysql服務器時出現dpkg錯誤
'sudo apt-get install mysql-server'
這將導致以下錯誤:
[my user name]@raspberrypi:~ $ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libaio1 libhtml-template-perl mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
libipc-sharedcache-perl mailx tinyca
The following NEW packages will be installed:
libaio1 libhtml-template-perl mysql-server mysql-server-5.5
mysql-server-core-5.5
0 upgraded, 5 newly installed, 0 to remove and 15 not upgraded.
Need to get 0 B/4,938 kB of archives.
After this operation, 46.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
libaio1 mysql-server-core-5.5 mysql-server-5.5 libhtml-template-perl
mysql-server
Install these packages without verification? [y/N] y
Preconfiguring packages ...
Selecting previously unselected package libaio1:armhf.
(Reading database ... 121517 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.110-1_armhf.deb ...
Unpacking libaio1:armhf (0.3.110-1) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.52-0+deb8u1_armhf.deb ...
Unpacking mysql-server-core-5.5 (5.5.52-0+deb8u1) ...
Preparing to unpack .../mysql-server-5.5_5.5.52-0+deb8u1_armhf.deb ...
Aborting downgrade from (at least) 10.0 to 5.5.
If are sure you want to downgrade to 5.5, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.52-0+deb8u1_armhf.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-1_all.deb ...
Unpacking libhtml-template-perl (2.95-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.52-0+deb8u1_all.deb ...
Unpacking mysql-server (5.5.52-0+deb8u1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.5_5.5.52-0+deb8u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我知道同樣的問題被報告在這裏: https://raspberrypi.stackexchange.com/questions/28312/raspberry-pi-2-installing-mysql-server
但在這種情況下,解決方案似乎啓用了回送接口。在我的情況下,迴環接口工作正常,但這並不能解決我的問題。
的ifconfig輸出:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1096 errors:0 dropped:0 overruns:0 frame:0
TX packets:1096 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:91408 (89.2 KiB) TX bytes:91408 (89.2 KiB)
我嘗試下面的命令,反反覆覆,沒有結果:
'sudo apt-get -f install'
'sudo apt-get autoremove'
'sudo apt-get autoclean'
'sudo apt-get update'
'sudo apt-get upgrade'
'sudo dpkg --configure -a'