我试图构建一个依赖于tiny_tds 0.6.3.rc1的ruby项目,该项目在尝试构建本机gem时失败。
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不存在。
我是否碰到了丢失的包裹,或者是否有更简单的东西丢失了?
[编辑]
sudo apt-get install libiconv-dev
以[{1}}
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 :(得分:0)
问题的根源归结为构建tiny_tds 0.6.3.rc1。版本0.7.0包含一些魔法来获取libiconv源,并构建库本身。在这种情况下,修复是通过一些创意依赖管理来升级我的项目所使用的tiny_tds的版本。
长话短说,libiconv在ubuntu 14.04中无法通过aptitude获得。