gpt4 book ai didi

ruby - 安装 dm-mysql-adapter 时出错

转载 作者:数据小太阳 更新时间:2023-10-29 07:04:04 24 4
gpt4 key购买 nike

我是 Ruby 的新手。我安装了 DataMapper 并且正在尝试安装 dm-mysql-adapter-1.0.2 gem 。但是当我尝试安装时,出现以下错误。我正在使用 ubuntu 操作系统。

vinoth@vinoth-laptop:~/Downloads$ gem install dm-mysql-adapter-1.0.2 -- --with-mysql-                    lib=/usr/lib/mysql -- --with-mysql-conf=/usr/bin/mysql 
WARNING: Installing to ~/.gem since /home/vinoth/gems and
/home/vinoth/gems/bin aren't both writable.
WARNING: You don't have /home/vinoth/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
Building native extensions. This could take a while...
ERROR: Error installing dm-mysql-adapter-1.0.2:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb --with-mysql-lib=/usr/lib/mysql -- --with-mysql- conf=/usr/bin/mysql
checking for mysql_query() in -lmysqlclient... no
*** 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
- ........


Gem files will remain installed in /home/vinoth/.gem/ruby/1.8/gems/do_mysql-0.10.2 for inspection.
Results logged to /home/vinoth/.gem/ruby/1.8/gems/do_mysql-0.10.2/ext/do_mysql/gem_make.out

我错过了什么吗?

附加信息。

Ruby 版本:ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
gem 版本:1.3.5

最佳答案

您需要安装 mysql 开发包:

sudo apt-get install libmysqlclient-dev

应该做的事

关于ruby - 安装 dm-mysql-adapter 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4661337/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com