【发布时间】:2017-11-17 01:23:21
【问题描述】:
我在尝试克隆存储库并启动并运行时遇到了问题。
当我运行 bundler 时,我遇到以下错误。出于某种原因,它不喜欢gem pg_query。在我看到的错误消息中:error: '__int128' is not supported for this target 但这超出了我的知识范围。我已尝试阅读类似的帖子,但尚未找到可行的解决方案。
Fetching pg_query 0.11.4
Installing pg_query 0.11.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/vagrant/.rbenv/versions/2.3.0/bin/ruby extconf.rb
compiling src/pg_query.c
In file included from ./src/postgres/include/postgres.h:47:0,
from src/pg_query_internal.h:4,
from src/pg_query.c:2:
./src/postgres/include/c.h:298:9: error: '__int128' is not supported for this ta
./src/postgres/include/c.h:298:24: warning: type defaults to 'int' in declaratio
./src/postgres/include/c.h:299:18: error: '__int128' is not supported for this t
make: *** [src/pg_query.o] Error 1
cp: cannot create regular file `./../../spec/files/': No such file or directory
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling pg_query_ruby.c
pg_query_ruby.c: In function 'pg_query_ruby_parse':
pg_query_ruby.c:80:2: warning: ISO C90 forbids mixed declarations and code [-Wde
pg_query_ruby.c: In function 'pg_query_ruby_normalize':
pg_query_ruby.c:99:2: warning: ISO C90 forbids mixed declarations and code [-Wde
pg_query_ruby.c: In function 'pg_query_ruby_fingerprint':
pg_query_ruby.c:115:2: warning: ISO C90 forbids mixed declarations and code [-Wd
linking shared-object pg_query/pg_query.so
/usr/bin/ld: cannot find -lpg_query
collect2: ld returned 1 exit status
make: *** [pg_query.so] Error 1
make failed, exit code 2
Gem files will remain installed in /home/vagrant/.rbenv/versions/2.3.0/lib/ruby/
Results logged to /home/vagrant/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/extens
An error occurred while installing pg_query (0.11.4), and Bundler cannot continu
Make sure that `gem install pg_query -v '0.11.4'` succeeds before bundling.
我尝试运行gem install pg_query -v '0.11.4' 并得到相同的结果。
【问题讨论】:
-
您的系统上是否安装了
postgres数据库?还在Gemfile中使用pggem 并在您的应用程序中使用pg数据库。 -
你能做两件事 1) 使用 bundler -v 检查 bundler 版本 2) 然后在 Gemfile.lock 的末尾检查必须有一些 bundler 版本在这里共享
-
@Aniket Shivam Tiwari 好的...所以我有 Bundler -v 1.16 而我的 Gemfile.lock 说 Bundled with 1.15
-
@puneet18 是的,以上我都有
-
您的问题解决了吗?
标签: ruby-on-rails ruby rubygems