我试图安装ruby黑客宝石,但它给我一个错误错误显示:由于某些原因无法创建Makefile,可能没有必要库和/或头文件。查看mkmf.log文件了解更多细节。你可能需要配置选项'
当前安装的ruby版本是Ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux-gnu]
gems version is3.2.5
这里是整个错误
ERROR: Error installing hacker-gems:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.7.0/gems/tiny_tds-2.1.5/ext/tiny_tds
/usr/bin/ruby2.7 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20210802-4029-18iz6u.rb extconf.rb
looking for freetds headers in the following directories:
- /opt/local/include
- /opt/local/include/freetds
- /usr/local/include
- /usr/local/include/freetds
looking for freetds library in the following directories:
- /opt/local/lib
- /opt/local/lib/freetds
- /usr/local/lib
- /usr/local/lib/freetds
checking for sybfront.h... no
checking for sybdb.h... no
checking for tdsdbopen() in -lsybdb... no
checking for dbanydatecrack() in -lsybdb... no
Failed! Do you have FreeTDS 0.95.80 or higher installed?
*** 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=/usr/bin/$(RUBY_BASE_NAME)2.7
--help
--with-freetds-dir
--without-freetds-dir
--with-freetds-include
--without-freetds-include=${freetds-dir}/include
--with-freetds-lib
--without-freetds-lib=${freetds-dir}/lib
--with-sybdb-dir
--without-sybdb-dir
--with-sybdb-include
--without-sybdb-include=${sybdb-dir}/include
--with-sybdb-lib
--without-sybdb-lib=${sybdb-dir}/lib
--with-sybdblib
--without-sybdblib
--with-sybdblib
--without-sybdblib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/tiny_tds-2.1.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.7.0/gems/tiny_tds-2.1.5 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/tiny_tds-2.1.5/gem_make.out
我试着安装各种依赖,并在网上搜索,但无济于事我错过了什么?
我解决了安装ruby-dev
的错误
Ubuntu:sudo apt-get install ruby-dev