ruby-on-rails 在Amazon AWS上安装libmagic-dev

dojqjjoe  于 2023-03-13  发布在  Ruby
关注(0)|答案(1)|浏览(104)

当我想在我的AWS机器上安装apt-get install libmagic-dev时,我遇到了这个错误:

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)

这是一个机器的Ruby on Rails项目与redis-server。我做错了什么?

qnakjoqk

qnakjoqk1#

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

sudo apt-get install libmagick++-dev

相关问题