How can I uninstall Ruby 1.9.2dev (2010-07-02) [i486-linux] on ubuntu? Need to reinstall - please help
如何在ubuntu上卸載Ruby 1.9.2dev (2010-07-02) [i486-linux] ?需要重新安裝-請幫助
11 个解决方案
#1
61
This command should do the trick (provided that you installed it using a dpkg-based packet manager):
這個命令應該完成這個任務(前提是您使用基於dpkg的包管理器安裝它):
aptitude purge ruby
#2
37
Run the following command from your terminal:
從終端運行以下命令:
sudo apt-get purge ruby
sudo apt-get清洗紅寶石
Usually works well for me.
通常對我來說效果很好。
#3
20
At first find out where ruby is? then
首先找出ruby在哪里?然后
rm -rf /usr/local/lib/ruby
rm -rf /usr/lib/ruby
rm -f /usr/local/bin/ruby
rm -f /usr/bin/ruby
rm -f /usr/local/bin/irb
rm -f /usr/bin/irb
rm -f /usr/local/bin/gem
rm -f /usr/bin/gem
#4
12
I have tried many include sudo apt-get purge ruby , sudo apt-get remove ruby and sudo aptitude purpe ruby, both with and without '*' at the end. But none of them worked, it's may be I've installed more than one version ruby.
我嘗試過很多,包括sudo apt-get清除ruby, sudo apt-get移除ruby和sudo aptitude purpe ruby,在結尾都有和沒有'*'。但是它們都不能工作,可能我安裝了不止一個版本的ruby。
Finally, when I triedsudo apt-get purge ruby1.9(with the version), then it works.
最后,當我使用triedsudo apt-get清除ruby1.9(帶有版本)時,它就可以工作了。
#5
8
Here is what sudo apt-get purge ruby* removed relating to GRUB for me:
下面是sudo apt-get清除ruby*與GRUB有關的內容:
grub-pc
grub-gfxpayload-lists
grub2-common
grub-pc-bin
grub-common
#6
4
On Lubuntu, I just tried apt-get purge ruby* and as well as removing ruby, it looks like this command tried to remove various things to do with GRUB, which is a bit worrying for next time I want to reboot my computer. I can't yet say if any damage has really been done.
在lubuntu中,我剛剛嘗試了apt-get清除ruby*和刪除ruby,看起來這個命令試圖刪除與GRUB有關的各種東西,這對於下次我想重新啟動我的計算機來說有點令人擔憂。我還不能說是否真的造成了損害。
#7
4
Run the following command on the terminal:
在終端上運行以下命令:
sudo apt-get autoremove ruby
#8
1
Why you are removing old version of the ruby?
為什么要刪除ruby的舊版本?
rvm install 2.4.2 // version of ruby u need to insatll rvm use 2.4.2 --default // set ruby version you want use by default
rvm安裝2.4.2 // /版本的ruby u需要insatll rvm使用2.4.2——默認//設置您希望默認使用的ruby版本
Using rvm you can install multiple ruby version in the system
使用rvm可以在系統中安裝多個ruby版本
Please follow below steps install ruby using rvm
請按照以下步驟使用rvm安裝ruby
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.4.2
rvm use 2.4.2 --default
ruby -v
The installation step will change for different Ubuntu version
安裝步驟將針對不同的Ubuntu版本進行更改
For more info,
為更多的信息,
https://gorails.com/setup/ubuntu/14.04
#9
0
If you used rbenv to install it, you can use
如果您使用rbenv安裝它,您可以使用
rbenv versions
to see which versions you have installed.
查看已安裝的版本。
Then, use the uninstall command:
然后,使用uninstall命令:
rbenv uninstall [-f|--force]
for example:
例如:
rbenv uninstall 2.4.0 # Uninstall Ruby 2.4.0
If you installed Rails, it will be removed, too.
如果你安裝了Rails,它也會被移除。
#10
0
You can use sudo apt remove ruby
您可以使用sudo apt移除ruby
#11
0
Uninstall the make install software when make uninstall invalid.
當使卸載無效時,卸載make安裝軟件。
make install will create file '.installed.list'
make install將創建file '.installed.list'文件
Choose to clean up the files described in .installed.list (need to be careful if you have multiple versions)
選擇清理.install中描述的文件。列表(如果有多個版本需要小心)
Case: ruby2.4 switch to ruby2.3, thinking directly delete all ruby software, and then re-make install 2.3, see: Ruby # Installation Guide
Case: ruby2.4切換到ruby2.3,考慮直接刪除所有ruby軟件,然后重新安裝2.3,見:ruby #安裝指南
make install -> .installed.list
make install - > .installed.list
see .installed.list file, delete all install files.
看到.installed。列出文件,刪除所有安裝文件。
rm -rf /usr/local/include/ruby-*
rm -rf /usr/local/lib/ruby
rm /usr/local/bin/erb /usr/local/bin/gem /usr/local/bin/irb /usr/local/bin/rdoc /usr/local/bin/ri /usr/local/bin/ruby
rm /usr/local/share/man/man1/erb.1 /usr/local/share/man/man1/irb.1 /usr/local/share/man/man1/ri.1 /usr/local/share/man/man1/ruby.1
rm /usr/local/lib/libruby-static.a
rm -rf /usr/local/lib/pkgconfig/ruby-*
which ruby
pkg-config --list-all|grep ruby