首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于libmagic1,apt-get安装失败

由于libmagic1,apt-get安装失败
EN

Ask Ubuntu用户
提问于 2016-05-04 00:44:21
回答 1查看 488关注 0票数 0

我的apt-get安装失败是因为以下与libmagic1有关的错误。我的Ubuntu版本是12.04 LTS。如果有人知道的话,你能帮忙吗?我需要修复这个来更新我的工作所需要的一些包。

代码语言:javascript
复制
~# sudo apt-get -f install
Reading package lists... Done

Building dependency tree
Reading state information... Done

Correcting dependencies... Done

The following packages were automatically installed and are no longer required:

  gir1.2-ubuntuoneui-3.0 libblas-dev patchutils libncurses5-dev po-debconf intltool-debian libreadline6-dev intltool liblapack-dev libtinfo-dev python-scour lesstif2 libubuntuoneui-3.0-1
  thunderbird-globalmenu html2text libmail-sendmail-perl libsys-hostname-long-perl dpatch libbz2-dev libreadline-dev
Use 'apt-get autoremove' to remove them.

The following extra packages will be installed:
  libmagic1

The following packages will be upgraded:
  libmagic1

1 upgraded, 0 newly installed, 0 to remove and 215 not upgraded.
305 not fully installed or removed.

Need to get 0 B/218 kB of archives.

After this operation, 5,120 B of additional disk space will be used.

Do you want to continue [Y/n]? Y

(Reading database ... 263712 files and directories currently installed.)
Preparing to replace libmagic1 5.09-2 (using .../libmagic1_5.09-2ubuntu0.6_amd64.deb) ...
Unpacking replacement libmagic1 ...
dpkg: warning: libmagic1: conffile 'etc/magic' is not a plain file or symlink (= '/usr/share/file/magic')
dpkg: error processing /var/cache/apt/archives/libmagic1_5.09-2ubuntu0.6_amd64.deb (--unpack):

 unable to open '/etc/magic.dpkg-new': No such file or directory

No apport report written because MaxReports is reached already Errors were encountered while processing:

 /var/cache/apt/archives/libmagic1_5.09-2ubuntu0.6_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
EN

回答 1

Ask Ubuntu用户

发布于 2016-05-04 00:56:52

检查/etc/magic,查看该文件是否存在,并检查/usr/share/file/magic文件夹是否存在

如果/etc/魔术不存在,请使用以下命令

代码语言:javascript
复制
sudo touch /etc/magic

如果usr/share/file/魔术文件夹不存在,请使用以下命令

代码语言:javascript
复制
sudo mkdir /usr/share/file/magic

然后再试..。这应该能解决这个问题,或者至少想出别的办法继续下去。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/767194

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档