1
當我想安裝容易,讓我的AWS機器上安裝libmagic-dev的,我有這樣的錯誤:亞馬遜安裝libmagic-dev的AWS
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libmagic-dev : Depends: libmagic1 (= 1:5.14-2ubuntu3.3) but 1:5.14-2ubuntu3.2 is to be installed
redis-server : Depends: redis-tools (= 2:2.8.4-2) but 3:3.0.4-1chl1~trusty1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
所以我輸入sudo apt-get的安裝-f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
redis-server
The following packages will be upgraded:
redis-server
1 upgraded, 0 newly installed, 0 to remove and 275 not upgraded.
1 not fully installed or removed.
Need to get 0 B/333 kB of archives.
After this operation, 144 kB of additional disk space will be used.
Do you want to continue? [Y/n] yes
(Reading database ... 69616 files and directories currently installed.)
Preparing to unpack .../redis-server_3%3a3.0.4-1chl1~trusty1_amd64.deb ...
/etc/init.d/redis-server: 16: .: Can't open /etc/rc.d/init.d/functions
invoke-rc.d: initscript redis-server, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 2
dpkg: trying script from the new package instead ...
/etc/init.d/redis-server: 16: .: Can't open /etc/rc.d/init.d/functions
invoke-rc.d: initscript redis-server, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/redis-server_3%3a3.0.4-1chl1~trusty1_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 2
update-rc.d: warning: /etc/init.d/redis-server missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
/etc/init.d/redis-server: 16: .: Can't open /etc/rc.d/init.d/functions
invoke-rc.d: initscript redis-server, action "start" failed.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/redis-server_3%3a3.0.4-1chl1~trusty1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
這是一個使用redis-server的Ruby on Rails項目機器。我做錯了什麼?
重新安裝redis-server修復此問題 – Kam