linux无法删除软件,Linux某些软件无法卸载问题

前几天更新ubuntu的时候,突然失败,仔细一看,是卸载老版本的gzip时候出了问题。错误信息:

install-info: No dir file specified; try --help for more information.

试了多个常用的手动卸载方法都没法搞定,于是求助google,很快找到答案。是GNU版的install-info代替了debian版的install-info造成的问题,覆盖回来就OK了。

不过作者分析问题的方法很值得学习,原文在blogspot上,所以全文转载之。

First, the problem.

I was trying to do sudo apt-get upgrade when it stopped on me giving this error

Setting up findutils (4.4.0-3) ...

install-info: No dir file specified; try --help for more information.

dpkg: error processing findutils (--configure):

subprocess post-installation script returned error exit status 1

Errors were encountered while processing:

findutils

W: No priority (or zero) specified for pin

E: Sub-process /usr/bin/dpkg returned an error code (1)

Well, I tried googling it up, without considerable success. Finally, I found this on Debian Bug report logs.

Apparently, there are packages named install-info. One, a GNU version, another, a Debian provided package.

The-Matrix% whereis install-info

install-info: /usr/sbin/install-info /usr/local/bin/install-info /usr/share/man/man8/install-info.8.gz

The-Matrix% /usr/sbin/install-info --version

Debian install-info version 1.14.25.

Copyright (C) 1994,1995 Ian Jackson.

This is free software; see the GNU General Public Licence version 2 or

later for copying conditions. There is NO warranty.

The-Matrix% /usr/local/bin/install-info --version

install-info (GNU texinfo) 4.13

Copyright (C) 2008 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

And they have problems. The idea of replacing the Debian's version with the GNU's has been forwarded, but I'm not sure of the progress. For all I care, the problem hasn't been solved.

As the link provided says, "It is not Debian's fault if someone has GNU's install-info in

$PATH before /usr/sbin/install-info - don't mess with the packaging system,

you'll just get in trouble."

Now, the solution.

Get the /usr/sbin into the $PATH variable before /usr/local/bin, or essentially, do something that would get dpkg to find the Debian's version of install-info. I did the latter, leaving $PATH as it was. Just renamed the GNU's version of install-info

The-Matrix% sudo mv /usr/local/bin/install-info /usr/local/bin/install-info-gnuAnd it works. ;)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Linux系统可以通过终端(Terminal)或图形界面(GUI)来卸载软件。终端方式可以使用apt-get(Ubuntu)或yum(CentOS)命令来实现,而图形界面方式可以使用系统自带的软件管理器来实现,比如Ubuntu的Ubuntu Software Center和CentOS的Add/Remove Software。 ### 回答2: Linux系统下可以使用以下几种方法卸载软件: 1. 使用包管理器:Linux系统拥有多种不同的包管理器,如Debian系统的apt、Red Hat系统的yum等。通过包管理器,可以方便地查找、安装、更新和卸载软件。不同的包管理器对应的具体命令有所不同,一般是使用类似"sudo apt remove 软件名"或"sudo yum remove 软件名"的命令来卸载软件。这种方法会自动处理软件及其相关的依赖包的安装和卸载。 2. 使用软件管理工具:一些Linux发行版,如Ubuntu,通常会提供软件中心这样的图形界面工具,可以直观地浏览、安装和卸载软件。打开软件中心,找到要卸载软件,点击卸载即可。 3. 使用源代码编译安装的软件:有些软件没有提供特定的包管理器安装方式,通常需要通过源代码编译安装。卸载这类软件时,可以在安装时使用"make uninstall"命令来记录安装信息,然后在安装目录中使用相应的命令来执行卸载操作。 无论使用哪种方法,卸载软件时应当谨慎,确保卸载软件是我们真正要删除的,以免造成不必要的损失。 ### 回答3: 在Linux中,可以使用不同的方法来卸载软件。以下是一些常见的卸载软件的方法: 1. 使用包管理器:大多数Linux发行版都有自己的包管理器,如Debian的apt、CentOS的yum或Fedora的dnf等。可以使用包管理器来卸载软件。例如,使用apt卸载软件可以运行以下命令: ``` sudo apt remove 软件包名字 ``` 这将从系统中完全移除指定的软件包。 2. 使用软件商店:某些Linux发行版(如Ubuntu)提供了软件商店应用程序,可以通过图形界面轻松卸载软件。只需打开软件商店,搜索并选择要卸载软件,然后点击卸载按钮即可。 3. 使用源码安装的软件:如果软件是通过源代码手动安装的,可以使用该软件提供的卸载脚本进行卸载。通常这个命令是"make uninstall"或者"./configure --uninstall"。 4. 使用命令行工具:有一些特定的命令行工具可用于卸载软件。例如,使用snap包管理器安装的软件可以使用以下命令进行卸载: ``` sudo snap remove 软件包名字 ``` 需要注意,使用不同的卸载方法可能会有不同的效果和影响。有时,卸载软件可能还会保留一些配置文件或依赖项。如果要完全清除软件,请务必查看相关文档或说明。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值