이 문제를 해결하기 위해 너무 많은 시간을 보냈습니다.pg gem 설치 오류 - osx, bundler 및 rvm
내 컴퓨터를 다시 포맷하면 즉각적인 라이온 업보다는 눈 표범이 깨끗합니다.
엑스 코드 4.2.1
RVM 내가 마지막으로 설치 번들있어 I 설정으로 내 환경을
을 설치 설치하고는 PG 보석을 만들려고하지 못했습니다.저는 postports를 macports를 사용하여 설치 했었습니다 (사자에 미리 설치되어 있다는 것을 모르고있었습니다). 여기 지시에 따라 : HTTP : //benscheirman.com/2010/06/installing-postgresql-for-rails-on-mac-os-x 그리고 페이지 보석 설치하려고 이상의 오류로 실행 :
Installing pg (0.12.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/me/.rvm/rubies/ruby-1.8.7-p357/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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=/Users/sling31/.rvm/rubies/ruby-1.8.7-p357/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
Gem files will remain installed in /Users/me/.rvm/gems/ruby-1.8.7-p357/gems/pg-0.12.0 for inspection.
Results logged to /Users/me/.rvm/gems/ruby-1.8.7-p357/gems/pg-0.12.0/ext/gem_make.out
An error occured while installing pg (0.12.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.12.0'` succeeds before bundling.
을 나는 stackoverflow 논스톱을 검색하고 거의 모든 것을 시도했다.
은 내가 MacPorts의 버전을 제거하고 사제로 설치하기로 결정했습니다 :BINDIR = /usr/local/Cellar/postgresql/9.1.2/bin
DOCDIR = /usr/local/Cellar/postgresql/9.1.2/share/doc/postgresql
HTMLDIR = /usr/local/Cellar/postgresql/9.1.2/share/doc/postgresql
INCLUDEDIR = /usr/local/Cellar/postgresql/9.1.2/include
PKGINCLUDEDIR = /usr/local/Cellar/postgresql/9.1.2/include
INCLUDEDIR-SERVER = /usr/local/Cellar/postgresql/9.1.2/include/server
LIBDIR = /usr/local/Cellar/postgresql/9.1.2/lib
PKGLIBDIR = /usr/local/Cellar/postgresql/9.1.2/lib
LOCALEDIR = /usr/local/Cellar/postgresql/9.1.2/share/locale
MANDIR = /usr/local/Cellar/postgresql/9.1.2/share/man
SHAREDIR = /usr/local/Cellar/postgresql/9.1.2/share/postgresql
SYSCONFDIR = /usr/local/Cellar/postgresql/9.1.2/etc
PGXS = /usr/local/Cellar/postgresql/9.1.2/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--disable-debug' '--prefix=/usr/local/Cellar/postgresql/9.1.2' '--enable-thread-safety' '--with-bonjour' '--with-gssapi' '--with-krb5' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-python' '--with-perl' '--with-ossp-uuid' '--datadir=/usr/local/Cellar/postgresql/9.1.2/share/postgresql' '--docdir=/usr/local/Cellar/postgresql/9.1.2/share/doc/postgresql' 'ARCHFLAGS='''-arch x86_64'''' 'CC=/usr/bin/llvm-gcc' 'CFLAGS=-O3 -w -pipe -march=core2 -msse4.1 -I/opt/local/include/ossp' 'LDFLAGS=-L/usr/local/Cellar/readline/6.2.2/lib -L/opt/local/lib' 'LIBS=-luuid' 'CPPFLAGS=-I/usr/local/Cellar/readline/6.2.2/include -I/usr/include/libxml2'
CC = /usr/bin/llvm-gcc
CPPFLAGS = -I/usr/local/Cellar/readline/6.2.2/include -I/usr/include/libxml2 -I/opt/local/include/libxml2
CFLAGS = -O3 -w -pipe -march=core2 -msse4.1 -I/opt/local/include/ossp -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv
CFLAGS_SL =
LDFLAGS = -L/usr/local/Cellar/readline/6.2.2/lib -L/opt/local/lib -L/opt/local/lib -Wl,-dead_strip_dylibs
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm -luuid
VERSION = PostgreSQL 9.1.2
내가 수출 rvm_archflags의 모든 시도 :
이
"양조 설치는 PostgreSQL은"
pg_config가 날 수 있습니다 = "- arch x86_64"유형의 솔루션은 있지만 아무런 차이가없는 것으로 보입니다.
어디서부터 시작해야할까요?
자제력 오류는 무엇입니까? 'brew info postgres'를 할 때 그것은 무엇을 말하는가? – Woahdae
blu에서 제대로 설치되지만 gem 확장을 빌드하지 않는다는 의미입니까? – Woahdae