2015-09-17 84 views
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项目机器。我做错了什么?

+0

重新安装redis-server修复此问题 – Kam

回答

0

我在一个月前遇到过这个问题。我给你一个适合我的代码。

sudo apt-get install libmagick++-dev