首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误包安装postgresql:‘`mktmpdir':父目录是全局可写的,但不是粘性的

错误包安装postgresql:‘`mktmpdir':父目录是全局可写的,但不是粘性的
EN

Stack Overflow用户
提问于 2015-03-24 19:17:43
回答 2查看 1.2K关注 0票数 3

我试图用数据库postgresql安装rails,得到了一个错误:

代码语言:javascript
复制
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
        --with-pg
        --without-pg
        --enable-windows-cross
        --disable-windows-cross
        --with-pg-config
        --without-pg-config
        --with-pg_config
        --without-pg_config
        --with-pg-dir
        --without-pg-dir
        --with-pg-include
        --without-pg-include=${pg-dir}/include
        --with-pg-lib
        --without-pg-lib=${pg-dir}/
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:92:in `mktmpdir': parent directory is world writable but not sticky (ArgumentError)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:510:in `try_link0'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:534:in `try_link'
        from extconf.rb:36:in `<main>'


Gem files will remain installed in /tmp/bundler20150325-70824-ipx8vh/pg-0.18.1/gems/pg-0.18.1 for inspection.
Results logged to /tmp/bundler20150325-70824-ipx8vh/pg-0.18.1/gems/pg-0.18.1/ext/gem_make.out
An error occurred while installing pg (0.18.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.1'` succeeds before bundling.

怎样才能解决这个问题呢?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-03-31 08:41:21

谢谢,但我有解决方案,问题是32位vs.64位兼容性。

代码语言:javascript
复制
ARCHFLAGS='-arch x86_64' gem install pg
票数 1
EN

Stack Overflow用户

发布于 2015-03-25 01:10:57

签出以下链接:stackoverflow.com网站/问询/9668753

这对我来说总是适用的,但我也先下载postgres,然后转到应用程序目录:Postgress.app

安装国产啤酒

代码语言:javascript
复制
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

如果你不确定你是否有家用啤酒运行:

代码语言:javascript
复制
brew -v 

如果安装了,您应该获得当前版本,如Hombree0.9.5

然后跑:

代码语言:javascript
复制
brew install postgresql

最后:

代码语言:javascript
复制
bundle install
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29241044

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档