2016-05-02 3 views
0

Nach dem Versuch bundle install und direkt mit `sudo gem install pg -v" 0.18.4 "'Ich laufe immer wieder in Fehler beim Versuch, die PG-Edelstein zu installieren. Alle meine Edelsteine ​​waren perfekt gelaufen, bis ich das neueste Update für OS X El Capitan installiert hatte. Der Fehler I erhalten wie folgt:Nicht in der Lage, pg gem nach OS X zu installieren El Capitan Update

sudo gem install pg -v '0.18.4' 
Building native extensions. This could take a while... 
ERROR: Error installing pg: 
    ERROR: Failed to build gem native extension. 

    current directory: /Library/Ruby/Gems/2.0.0/gems/pg-0.18.4/ext 
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20160502-32186-1wkopvv.rb extconf.rb 
checking for pg_config... yes 
Using config values from /usr/local/bin/pg_config 
checking for libpq-fe.h... yes 
checking for libpq/libpq-fs.h... yes 
checking for pg_config_manual.h... yes 
checking for PQconnectdb() in -lpq... no 
checking for PQconnectdb() in -llibpq... no 
checking for PQconnectdb() in -lms/libpq... no 
Can't find the PostgreSQL client library (libpq) 
*** 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}/ 
    --with-pqlib 
    --without-pqlib 
    --with-libpqlib 
    --without-libpqlib 
    --with-ms/libpqlib 
    --without-ms/libpqlib 

To see why this extension failed to compile, please check the mkmf.log which can be found here: 

    /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/pg-0.18.4/mkmf.log 

extconf failed, exit code 1 

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/pg-0.18.4 for inspection. 
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/pg-0.18.4/gem_make.out 

ich schrecklich bin verloren, wie dieses Problem zu beheben ...

+0

haben Sie versucht, die Lösungen in diesen: http://stackoverflow.com/questions/6209797/cant-find-the-postgresql-client-library-libpq http://stackoverflow.com/questions/25629953/bundle- failing-cant-find-die-postgresql-client-library-libpq? – user2313597

+0

hatte ich leider, hab es aber jetzt gelöst, danke! – JKW

Antwort

3

Ich glaube, das Problem behoben werden kann, wenn Sie postgresql auf Ihrem System installieren. Ich hatte einen ähnlichen Fehler den anderen Tag, und es wurde festgelegt durch Homebrew Installation und

brew install postgresql 
+0

Hatte die Verknüpfung aufheben und dann deinstallieren, aber das war es! Vielen Dank! – JKW

0

läuft Es sieht aus wie Sie postgresql auf Ihrem System installieren. Wenn Sie OSX haben, ist der einfachste Weg, um mit PostgreSQL zu beginnen, die Postgres.app, die hier gefunden werden kann - Postgresapp.com

Klicken Sie einfach auf Download, und Sie erhalten Postgres, während die Befehlszeile zu vermeiden.