第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

在嘗試安裝pg gem時(shí)找不到‘libpq-fe.h標(biāo)頭

在嘗試安裝pg gem時(shí)找不到‘libpq-fe.h標(biāo)頭

HUH函數(shù) 2019-07-02 15:29:24
在嘗試安裝pg gem時(shí)找不到‘libpq-fe.h標(biāo)頭我正在使用RubyonRails 3.1預(yù)版本。我喜歡使用PostgreSQL,但問(wèn)題是安裝pg寶石。它給出了以下錯(cuò)誤:$ gem install pgBuilding native extensions.  This could take a while...ERROR:  Error installing pg:    ERROR: Failed to build gem native extension.        /home/u/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rbchecking for pg_config... noNo pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_configchecking for libpq-fe.h... noCan't find the 'libpq-fe.h header*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack ofnecessary libraries and/or headers.  Check the mkmf.log file for moredetails.  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=/home/u/.rvm/rubies/ruby-1.9.2-p0/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_configGem files will remain installed in /home/u/.rvm/gems/ruby-1.9.2-p0/gems/pg-0.11.0 for inspection.Results logged to /home/u/.rvm/gems/ruby-1.9.2-p0/gems/pg-0.11.0/ext/gem_make.out我該如何解決這個(gè)問(wèn)題?
查看完整描述

3 回答

?
瀟湘沐

TA貢獻(xiàn)1816條經(jīng)驗(yàn) 獲得超6個(gè)贊

在……上面MacOS(以前MacOSXOSX)、使用自制若要安裝適當(dāng)?shù)臉?biāo)題,請(qǐng)執(zhí)行以下操作:

brew install postgresql

然后跑

gem install pg

應(yīng)該行得通。

或者,而不是安裝整個(gè)postgresql,你可以brew install libpq并輸出正確的PATHPKG_CONFIG_PATH如“注意事項(xiàng)”一節(jié)所述


查看完整回答
反對(duì) 回復(fù) 2019-07-02
?
富國(guó)滬深

TA貢獻(xiàn)1790條經(jīng)驗(yàn) 獲得超9個(gè)贊

我也試過(guò)gem install libpq-dev,但我收到了以下錯(cuò)誤:

Can't find the 'libpq-fe.h header*** extconf.rb failed ***

但是我發(fā)現(xiàn)sudo apt-get(我試圖避免與RubyonRails一起使用)成功了,即

sudo apt-get install libpq-dev# orapt-get install postgres-server-dev-{pg.version}# for postgresql 9.4 on Ubuntu 14.04

然后我就能做到

gem install pg

沒(méi)有問(wèn)題。


查看完整回答
反對(duì) 回復(fù) 2019-07-02
  • 3 回答
  • 0 關(guān)注
  • 1121 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)