Postgresql gem install pg 0.18.4 通过,捆绑安装失败

编程入门 行业动态 更新时间:2024-10-10 06:13:37
本文介绍了Postgresql gem install pg 0.18.4 通过,捆绑安装失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Mac OS El Capitan

Mac OS El Capitan

捆绑安装失败:

compiling pg_connection.c pg_connection.c:2394:3: warning: implicit declaration of function 'gettimeofday' is invalid in C99 [-Wimplicit-function-declaration] gettimeofday(&currtime, NULL); ^ 1 warning generated. compiling pg_copy_coder.c compiling pg_errors.c compiling pg_result.c compiling pg_text_decoder.c compiling pg_text_encoder.c compiling pg_type_map.c compiling pg_type_map_all_strings.c compiling pg_type_map_by_class.c compiling pg_type_map_by_column.c compiling pg_type_map_by_mri_type.c compiling pg_type_map_by_oid.c compiling pg_type_map_in_ruby.c compiling util.c linking shared-object pg_ext.bundle ld: file not found: dynamic_lookup clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [pg_ext.bundle] Error 1 make failed, exit code 2 Gem files will remain installed in /Users/jmintz/Documents/LaunchAngels/radar/vendor/bundle/gems/pg-0.18.4 for inspection. Results logged to /Users/jmintz/Documents/LaunchAngels/radar/vendor/bundle/extensions/x86_64-darwin-15/2.2.0-static/pg-0.18.4/gem_make.out

......

An error occurred while installing pg (0.18.4), and Bundler cannot continue. Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.

运行 'gem install pg -v '0.18.4' 结果:

Running 'gem install pg -v '0.18.4' results in:

Building native extensions. This could take a while... Successfully installed pg-0.18.4 Parsing documentation for pg-0.18.4 Done installing documentation for pg after 4 seconds 1 gem installed

然而,再次运行捆绑安装"失败.有什么建议么?我试过用自制软件卸载并重新安装 postgresql,但没有运气

Yet running 'bundle install' again fails. Any suggestions? I've tried uninstalling and reinstalling postgresql with homebrew with no luck

推荐答案

我现在在 macOS Catalina 上遇到了类似的错误,但我无法成功运行

I have got a similar error now on macOS Catalina, but I was not able to successfully run

gem install pg -v '0.18.4'

我在帮助我解决问题的 puma gem(我知道这是另一个 gem)中发现了这个问题:github/puma/puma/issues/2304.

I found this issue in the puma gem (I know this is another gem) that helped me solve the issue: github/puma/puma/issues/2304.

在那里,我发现了这个:

There, I found this:

Clang 现在默认启用 -Werror=implicit-function-declaration:

Clang now enables -Werror=implicit-function-declaration by default:

Clang 现在在您使用没有显式的函数时报告错误为 macOS 构建 C 或 Objective-C 代码时的声明(-Werror=implicit-function-declaration 标志打开).这个额外的错误检测统一了 iOS/tvOS 和 macOS 64 位的 Clang 行为此诊断的目标.(49917738)

Clang now reports an error when you use a function without an explicit declaration when building C or Objective-C code for macOS (-Werror=implicit-function-declaration flag is on). This additional error detection unifies Clang’s behavior for iOS/tvOS and macOS 64-bit targets for this diagnostic. (49917738)

还有这个:

gem install puma:4.3.5 -- --with-cflags="-Wno-error=implicit-function-declaration"

因此,我能够使用以下命令构建 pg:

So, I was able to build pg with:

gem install pg -v '0.18.1' -- --with-cflags="-Wno-error=implicit-function-declaration"

更多推荐

Postgresql gem install pg 0.18.4 通过,捆绑安装失败

本文发布于:2023-10-14 03:52:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1489945.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:gem   Postgresql   install   pg

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!