<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>knight (呵呵)</title>
    <link>https://ruby-china.org/knight</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>关于 bundle 的一个弱弱的问题</title>
      <description>&lt;p&gt;就是吧 运行 bundle install
总是出现&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking &lt;span class="k"&gt;for &lt;/span&gt;pg_config... &lt;span class="nb"&gt;yes
&lt;/span&gt;Using config values from /usr/local/bin/pg_config
checking &lt;span class="k"&gt;for &lt;/span&gt;libpq-fe.h... &lt;span class="nb"&gt;yes
&lt;/span&gt;checking &lt;span class="k"&gt;for &lt;/span&gt;libpq/libpq-fs.h... &lt;span class="nb"&gt;yes
&lt;/span&gt;checking &lt;span class="k"&gt;for &lt;/span&gt;pg_config_manual.h... &lt;span class="nb"&gt;yes
&lt;/span&gt;checking &lt;span class="k"&gt;for &lt;/span&gt;PQconnectdb&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;-lpq&lt;/span&gt;... no
checking &lt;span class="k"&gt;for &lt;/span&gt;PQconnectdb&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;-llibpq&lt;/span&gt;... no
checking &lt;span class="k"&gt;for &lt;/span&gt;PQconnectdb&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;-lms&lt;/span&gt;/libpq... no
Can&lt;span class="s1"&gt;'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


Gem files will remain installed in /var/folders/yy/8cck9sl93f97xz4qbv4wtxth0000gn/T/bundler20150210-1783-1x6bqzr/pg-0.18.1/gems/pg-0.18.1 for inspection.
Results logged to /var/folders/yy/8cck9sl93f97xz4qbv4wtxth0000gn/T/bundler20150210-1783-1x6bqzr/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 '&lt;/span&gt;0.18.1&lt;span class="s1"&gt;'` succeeds before bundling.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;运行 gem install pg -v 0.18.1&lt;/p&gt;

&lt;p&gt;又出现 &lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Building native extensions.  This could take a &lt;span class="k"&gt;while&lt;/span&gt;...
ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking &lt;span class="k"&gt;for &lt;/span&gt;pg_config... &lt;span class="nb"&gt;yes
&lt;/span&gt;Using config values from /usr/local/bin/pg_config
checking &lt;span class="k"&gt;for &lt;/span&gt;libpq-fe.h... &lt;span class="nb"&gt;yes
&lt;/span&gt;checking &lt;span class="k"&gt;for &lt;/span&gt;libpq/libpq-fs.h... &lt;span class="nb"&gt;yes
&lt;/span&gt;checking &lt;span class="k"&gt;for &lt;/span&gt;pg_config_manual.h... &lt;span class="nb"&gt;yes
&lt;/span&gt;checking &lt;span class="k"&gt;for &lt;/span&gt;PQconnectdb&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;-lpq&lt;/span&gt;... no
checking &lt;span class="k"&gt;for &lt;/span&gt;PQconnectdb&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;-llibpq&lt;/span&gt;... no
checking &lt;span class="k"&gt;for &lt;/span&gt;PQconnectdb&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;-lms&lt;/span&gt;/libpq... no
Can&lt;span class="s1"&gt;'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


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/pg-0.18.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/pg-0.18.1/ext/gem_make.out

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;thx&lt;/p&gt;</description>
      <author>knight</author>
      <pubDate>Tue, 10 Feb 2015 01:47:21 +0800</pubDate>
      <link>https://ruby-china.org/topics/24188</link>
      <guid>https://ruby-china.org/topics/24188</guid>
    </item>
  </channel>
</rss>
