在 cygwin 上安装 sqlite3-ruby 时出现问题

发布于 2024-09-13 02:55:54 字数 851 浏览 3 评论 0原文

我在尝试安装 sqlite3-ruby gem 时遇到错误:

gem install sqlite3-ruby-1.3.1.gem 
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby-1.3.1.gem:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby.exe extconf.rb


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out

相同使用:

gem install sqlite3-ruby-1.3.1

并且有效:

gem install sqlite3-ruby-1.3.1-x86-mswin32-60.gem

但是我发现我已经安装了 sqlite-ruby-1.2.5

那么我的问题是“gem”如何安装这些东西?为什么它不能自动选择sqlite3-ruby-1.3.1-x86-mswin32-60.gem版本。 “gem”是否知道在 Linux 或 Windows 上运行?它的本机扩展是什么以及为什么它无法安装预下载的 sqlite3-ruby-1.3.1.gem

提前致谢

I'm getting error while trying to install sqlite3-ruby gem:

gem install sqlite3-ruby-1.3.1.gem 
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby-1.3.1.gem:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby.exe extconf.rb


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out

Same using:

gem install sqlite3-ruby-1.3.1

And that worked:

gem install sqlite3-ruby-1.3.1-x86-mswin32-60.gem

However I discovered I had had installed sqlite-ruby-1.2.5

Well my question is how 'gem' is installing these things? Why it can't choose sqlite3-ruby-1.3.1-x86-mswin32-60.gem version automatically. Does 'gem' is aware of running on linux or windows? What is native extension for it and why it is failing to install predownloaded sqlite3-ruby-1.3.1.gem

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忆依然 2024-09-20 02:55:54

看来很多人都有这个问题。我很惊讶这不能开箱即用,因为我猜想 cygwin+ruby+sqlite 是一个超级常见的配置。反正。许多人关注 sqlite3.h,这是错误输出中缺失的内容。但是,我的问题是 gcc 没有正确安装。 显然 gcc 在 cygwin 下可能无法正确安装。我解决了这个问题,一切都很好。另外,请确保在 cygwin 中安装 libsql3-devel。

Lots of people seem to be having this issue. I'm surprised this doesn't work out of the box, as I would have guessed cygwin+ruby+sqlite is a supercommon configuration. Anyway. Many people concentrate on sqlite3.h, which is what appears are missing in the error output. However, my problem was that gcc wasn't installed correctly. Apparently gcc can fail to install correctly under cygwin. I fixed that and it was fine. Also, make sure you install libsql3-devel in cygwin.

谢绝鈎搭 2024-09-20 02:55:54

我以前也走过这条路。我无法在 Windows 中安装 Ruby 来与 Cygwin 一起使用,并且 我在 Ubuntu 上失败了

为了节省时间和麻烦,你要做的就是使用 Linux 映像运行 VM(Fedora 似乎工作得很好)并在这方面与 Ruby 合作。

I've been down this road before. I failed installing Ruby in Windows to work with Cygwin and I failed on Ubuntu.

What you do to save yourself the time and trouble is get a VM running with a Linux image (Fedora seemed to work well) and work with Ruby in that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文