如何从 cygwin 安装中卸载 ruby
我的 cygwin 安装包含以下 ruby 二进制文件,如何卸载这些二进制文件,因为我想在 Windows Vista 计算机上使用 ruby 192
ruby.exe
rubyw.exe
My cygwin installation contains the following ruby binaries, how can I uninstall these binaries since I would like to use ruby 192 on my windows vista machine
ruby.exe
rubyw.exe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
要卸载 Cygwin 上的任何软件包,请运行
setup-x86.exe
或setup-x86_64.exe
(您应该已经有,或者您可以获取它们 此处),选择“解释器”下的“ruby”,单击圆形箭头图标,直到显示“卸载”,然后继续。这将删除可执行文件和库并处理所有依赖项。您可以直接删除这些文件,但这可能会使系统处于不一致的状态,并且您可能会错过某些内容。不幸的是,Cygwin 似乎还没有 Ruby 1.9.2(注意:这是我几年前写的,目前无法检查)。您打算如何安装它?如果您要安装纯 Windows(非 Cygwin)版本的 ruby,则可能不需要卸载 Cygwin 版本。例如,我的 Windows 7 系统上同时安装了 Cygwin Perl 和 ActiveState Perl;我使用一个来自 Cygwin 环境,另一个来自 Windows 环境。
或者我想你可以在 Cygwin 下从源代码构建 ruby 1.9.2;在这种情况下,是的,您需要首先卸载 Cygwin ruby 安装。
(在我撰写此更新时,Ruby 的最新版本是 2.3.2。)
http:// www.ruby-lang.org/en/downloads/ 有更多关于安装 ruby 的信息(但没有关于 Cygwin 的具体信息)。
To uninstall any package on Cygwin, run
setup-x86.exe
orsetup-x86_64.exe
(which you should already have, or you can get them here), select "ruby" under "interpreters", click the round arrow icon until it says "Uninstall", then continue. This will remove the executables and libraries and take care of any dependencies. You could remove the files directly, but that might leave the system in an inconsistent state, and you might miss something.Cygwin doesn't seem to have Ruby 1.9.2 yet, unfortunately (NOTE: I wrote this several years ago and I'm not currently able to check). How do you intend to install it? If you're going to install a pure Windows (non-Cygwin) version of ruby, you may not need to uninstall the Cygwin version. For example, I have both Cygwin Perl and ActiveState Perl on my Windows 7 system; I use one from the Cygwin environment, the other from the Windows environment.
Or I suppose you could build ruby 1.9.2 from source under Cygwin; in that case, yes, you would want to uninstall the Cygwin ruby installation first.
(As I write this update, the latest version of Ruby is 2.3.2.)
http://www.ruby-lang.org/en/downloads/ has more information about ways to install ruby (but nothing specific about Cygwin).
我已经尝试过 Cygwin docs 中所说的内容:
但它不起作用,我在运行安装程序时为“所有用户”和“我的用户”执行了此操作。
所以我最终重复了这个过程,但没有检查“选择所需的包(推荐)”,这次它起作用了。现在:
作为最后一步,我删除了我的 Cygwin 主文件夹中的
.gem
文件。I have tried what says in Cygwin docs:
But it did not work, I did it for "All Users" and for "My User" when running Setup.
So I finally repeated the process but without checking "Select required packages(RECOMMENDED)" and that time it worked. Now:
As last step I deleted the
.gem
file in my home Cygwin folder.作为替代方案,您可以使用 RVM(Ruby 版本管理器) 安装 Ruby 1.9.2,同时保持当前版本可用。您需要有curl、git、automake 和mingw 来安装和编译Ruby。
As an alternative, you can use RVM (Ruby Version Manager) to install Ruby 1.9.2 while keeping your current version available. You'll need to have curl, git, automake and mingw to install and compile Ruby.