irpas技术客

How to fix the ERROR: Failed to build gem native extension in Centos 8_梦想家DBA

网络 7314

[root@DBAMAXWELL ~]# gem install mongo Building native extensions. This could take a while... ERROR: ?Error installing mongo: ? ? ? ? ERROR: Failed to build gem native extension.

? ? current directory: /usr/local/share/gems/gems/bson-4.14.1/ext/bson /usr/bin/ruby -r ./siteconf20220325-427526-vfnj46.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /usr/local/share/gems/gems/bson-4.14.1 for inspection. Results logged to /usr/local/lib64/gems/ruby/bson-4.14.1/gem_make.out

Solution

[root@DBAMAXWELL ~]# yum install ruby-devel Last metadata expiration check: 1:48:48 ago on Fri 25 Mar 2022 05:54:43 PM CST. Dependencies resolved. =============================================================================================================================================================================================================== ?Package ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Architecture ? ? ? ? ? ? ? ? ? ? ? ? ? ?Version ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Repository ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Size =============================================================================================================================================================================================================== Installing: ?ruby-devel ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?x86_64 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?2.5.9-109.module_el8.5.0+1097+b05a0601 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? appstream ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?126 k

Transaction Summary =============================================================================================================================================================================================================== Install ?1 Package

Total download size: 126 k Installed size: 294 k Is this ok [y/N]: y Downloading Packages: [MIRROR] ruby-devel-2.5.9-109.module_el8.5.0+1097+b05a0601.x86_64.rpm: Curl error (28): Timeout was reached for http://centosg9.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ruby-devel-2.5.9-109.module_el8.5.0%2b1097%2bb05a0601.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds] ruby-devel-2.5.9-109.module_el8.5.0+1097+b05a0601.x86_64.rpm ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1.6 kB/s | 126 kB ? ? 01:17 ? ? --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?1.6 kB/s | 126 kB ? ? 01:18 ? ?? Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction ? Preparing ? ? ? ?: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1/1? ? Installing ? ? ? : ruby-devel-2.5.9-109.module_el8.5.0+1097+b05a0601.x86_64 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?1/1? ? Running scriptlet: ruby-devel-2.5.9-109.module_el8.5.0+1097+b05a0601.x86_64 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?1/1? ? Verifying ? ? ? ?: ruby-devel-2.5.9-109.module_el8.5.0+1097+b05a0601.x86_64 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?1/1?

Installed: ? ruby-devel-2.5.9-109.module_el8.5.0+1097+b05a0601.x86_64 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??

Complete! [root@DBAMAXWELL ~]# gem install mongo Building native extensions. This could take a while... Successfully installed bson-4.14.1 Fetching: mongo-2.17.0.gem (100%) Successfully installed mongo-2.17.0 2 gems installed [root@DBAMAXWELL ~]#?


1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,会注明原创字样,如未注明都非原创,如有侵权请联系删除!;3.作者投稿可能会经我们编辑修改或补充;4.本站不提供任何储存功能只提供收集或者投稿人的网盘链接。

标签: #How #To #fix #The #error #failed #build