2015-12-02 73 views
2

我試圖構建一個依賴於tiny_tds 0.6.3.rc1的ruby項目,在嘗試構建本地gem時失敗。哪裏可以找到ubuntu 14.04上的iconv.h?

gem install tiny_tds -v '0.6.3.rc1'失敗,一個有用的尋找節內容如下:

Building native extensions. This could take a while... 
ERROR: Error installing tiny_tds: 
    ERROR: Failed to build gem native extension. 

    /home/deploy/.rvm/rubies/ruby-2.1.7/bin/ruby -r ./siteconf20151202-9469-rxbbcc.rb extconf.rb 
checking for iconv_open() in iconv.h... *** 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. 

的消息很清楚,我需要iconv.h,這我通常只是通過sudo apt-get install libiconv安裝,只是似乎libiconv的這不是Ubuntu 14.04的一種想法。

我碰到一個丟失的包,還是有一些簡單的我失蹤?

[編輯] ​​回來了E: Unable to locate package libiconv-dev

一個簡短的搜索包資源庫的表明,它似乎並不存在:

$ lsb_release -a 
No LSB modules are available. 
Distributor ID: Ubuntu 
Description: Ubuntu 14.04.3 LTS 
Release: 14.04 
Codename: trusty 

$ apt-cache search libiconv 
librecode0 - Shared library on which recode is based 
recode - Character set conversion utility 
cl-babel - A charset encoding/decoding library, not unlike GNU libiconv 
enca - Extremely Naive Charset Analyser - binaries 
libiconv-hook-dev - header files of libiconv-hook 
libiconv-hook1 - extension of iconv for libapache-mod-encoding 
+0

還應該有一個'-dev'包含頭文件。非dev軟件包只包含lib。 –

+0

感謝您的企圖@ t.niese - 可悲的是,我似乎運氣不好。更多谷歌搜索顯示,我可能只需要從gnu org站點下載源代碼並手動安裝。 –

+0

你安裝了'sudo apt-get install build-essentials'嗎? –

回答

0

問題的根源歸結爲建築tiny_tds 0.6.3.rc1。版本0.7.0包含一些魔術來獲取libiconv源代碼,並自己構建庫。在這種情況下,修復是通過一些創意依賴管理升級我的項目使用的tiny_tds版本。

長話短說,libiconv在ubuntu 14.04的aptitude中不可用。