Ubuntu12.04下postgresql-9.3.4編譯源碼出錯,無readline library not found

來源:互聯網
上載者:User

標籤:

1.問題現象:

下載連結:http://www.postgresql.org/ftp/source/

解壓後編譯安裝(需要root許可權)

1 [email protected]:/opt/postgresql-9.3.4#  tar -zxvf postgresql-9.3.4.tar.gz2 [email protected]:/opt/postgresql-9.3.4#  cd postgresql-9.3.4/3 [email protected]:/opt/postgresql-9.3.4#  ./configure && make && make install

此時出現如下錯誤

其中資訊有說可以使用--without-readline,但是Pg官方不推薦如此使用。使用後具體結果,沒試過不清楚。

另外的玩法是補全readline library:

[email protected]:/opt/postgresql-9.3.4# ldconfig -p | grep readline
libreadline.so.6 (libc6,x86-64) => /lib/x86_64-linux-gnu/libreadline.so.6

找到此系統中有libreadline.so.6這個庫檔案,而網上有很多說應該安裝libreadline5-dev,但是安裝此庫時報錯:

 

[email protected]:/opt/postgresql-9.3.4# apt-get install libreadline5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libreadline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libreadline-gplv2-dev:i386 lib64readline-gplv2-dev:i386 libreadline-gplv2-dev

E: Package ‘libreadline5-dev‘ has no installation candidate

猜想:這種安裝應該對這種情況比較適合:libreadline.so.5 (libc6) => /lib/libreadline.so.5,含有這類的用上面的命令可以。

解決之法:

針對之前的顯示就安裝libreadline6-dev比較OK

[email protected]:/opt/postgresql-9.3.4# apt-get install  libreadline6-devReading package lists... DoneBuilding dependency treeReading state information... DoneThe following extra packages will be installed:  libtinfo-devThe following NEW packages will be installed:  libreadline6-dev libtinfo-dev0 upgraded, 2 newly installed, 0 to remove and 79 not upgraded.Need to get 367 kB of archives.After this operation, 1,202 kB of additional disk space will be used.Do you want to continue [Y/n]?Get:1 http://mirrors.163.com/ubuntu/ precise/main libtinfo-dev amd64 5.9-4 [103 kB]Get:2 http://mirrors.163.com/ubuntu/ precise/main libreadline6-dev amd64 6.2-8 [264 kB]Fetched 367 kB in 1s (230 kB/s)Selecting previously unselected package libtinfo-dev.(Reading database ... 82773 files and directories currently installed.)Unpacking libtinfo-dev (from .../libtinfo-dev_5.9-4_amd64.deb) ...Selecting previously unselected package libreadline6-dev.Unpacking libreadline6-dev (from .../libreadline6-dev_6.2-8_amd64.deb) ...Processing triggers for install-info ...Setting up libtinfo-dev (5.9-4) ...Setting up libreadline6-dev (6.2-8) ...

如此安裝成功!!!

 

Ubuntu12.04下postgresql-9.3.4編譯源碼出錯,無readline library not found

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.