如何从 Ubuntu 中删除 Ruby [英] How to remove Ruby from Ubuntu

查看:65
本文介绍了如何从 Ubuntu 中删除 Ruby的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想删除 Ruby,所以我试试这个.我怎样才能删除它?

sudo apt-get autoremove ruby阅读包裹清单...完成构建依赖树读取状态信息...完成未安装包ruby",因此未删除0 升级,0 新安装,0 删除,534 未升级.here@jaskaran:/$ whereis ruby红宝石:/usr/bin/ruby/usr/lib/ruby/usr/bin/X11/ruby/usr/share/man/man1/ruby.1.gz这里@jaskaran:/$ ruby​​ -vruby 1.9.3p194 (2012-04-20 修订版 35410) [i686-linux]

解决方案

Ubuntu...?

使用它来找出您正在运行的可执行文件:

$ 哪个红宝石/usr/bin/ruby

用它来找出它到底是什么:

$ readlink -f/usr/bin/ruby/usr/bin/ruby1.8

使用它来找出它属于哪个包:

$ dpkg -S/usr/bin/ruby1.8ruby1.8:/usr/bin/ruby1.8

用它来卸载那个:

$ apt-get purge ruby​​1.8

<块引用>

注意:如果您使用版本/环境管理器安装了 Ruby,例如 RVMRbenv 那么这个方法是行不通的,因为 Ruby 将作为脚本而不是包安装.

I want to remove Ruby, so I try this. How can I remove this?

sudo apt-get autoremove ruby
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'ruby' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 534 not upgraded.

here@jaskaran:/$ whereis ruby
    ruby: /usr/bin/ruby /usr/lib/ruby /usr/bin/X11/ruby /usr/share/man/man1/ruby.1.gz
here@jaskaran:/$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

解决方案

Ubuntu...?

Use this to find out what executable you're running:

$ which ruby
/usr/bin/ruby

Use this to find out what it actually is:

$ readlink -f /usr/bin/ruby
/usr/bin/ruby1.8

Use this to find out what package it belongs to:

$ dpkg -S /usr/bin/ruby1.8
ruby1.8: /usr/bin/ruby1.8

Use this to uninstall that:

$ apt-get purge ruby1.8

Note: If you have installed Ruby using Version/Environment managers like RVM or Rbenv then this method is not gonna work because Rubies will be installed as scripts not packages.

这篇关于如何从 Ubuntu 中删除 Ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆