gpt4 book ai didi

ruby - 在 gem 安装 id3lib-ruby 期间缺少 libstdc++

转载 作者:太空宇宙 更新时间:2023-11-03 18:23:24 25 4
gpt4 key购买 nike

我正在尝试安装 id3lib-ruby,但出现此错误:

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

/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby extconf.rb
checking for main() in -lstdc++... no
You must have libstdc++ installed.
*** extconf.rb failed ***

我已经安装了各种 libstdc++:

$ apt-cache search libstdc | grep dev
lib32gmp-dev - Multiprecision arithmetic library developers tools (32bit)
libgmp-dev - Multiprecision arithmetic library developers tools
libstdc++6-4.4-dev - GNU Standard C++ Library v3 (development files)
libstdc++6-4.6-dev - GNU Standard C++ Library v3 (development files)
libstdc++6-4.7-dev - GNU Standard C++ Library v3 (development files)
libstdc++6-4.5-dev - GNU Standard C++ Library v3 (development files)
libstdc++6-4.6-dev-armel-cross - GNU Standard C++ Library v3 (development files)
libstdc++6-4.6-dev-armhf-cross - GNU Standard C++ Library v3 (development files)
libstdc++6-4.7-dev-armel-cross - GNU Standard C++ Library v3 (development files)
libstdc++6-4.7-dev-armhf-cross - GNU Standard C++ Library v3 (development files)

这是 mkmf.log:

have_library: checking for main() in -lstdc++... -------------------- no

"/usr/bin/gcc-4.6 -o conftest -I/opt/local/include -I. -I/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/x86_64-linux -I. -I/usr/local/include -I/opt/local/include -I/sw/include -g -O2 conftest.c -L. -L/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib -Wl,-R/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L/opt/local/lib -Wl,-R/opt/local/lib -L/sw/lib -Wl,-R/sw/lib -L. -rdynamic -Wl,-export-dynamic -lruby-static -lstdc++ -L/opt/local/lib -lrt -ldl -lcrypt -lm -lc"
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */

"/usr/bin/gcc-4.6 -o conftest -I/opt/local/include -I. -I/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/x86_64-linux -I. -I/usr/local/include -I/opt/local/include -I/sw/include -g -O2 conftest.c -L. -L/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib -Wl,-R/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L/opt/local/lib -Wl,-R/opt/local/lib -L/sw/lib -Wl,-R/sw/lib -L. -rdynamic -Wl,-export-dynamic -lruby-static -lstdc++ -L/opt/local/lib -lrt -ldl -lcrypt -lm -lc"
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { main(); return 0; }
/* end */

--------------------

知道我做错了什么或如何解决吗?

最佳答案

你可能同时解决了你的问题,但因为我有 a similar issue recently and got help here ,我想我可能会分享 apt-get install build-essential 解决了我丢失的 libstdc++ 错误。

关于ruby - 在 gem 安装 id3lib-ruby 期间缺少 libstdc++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14485266/

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