Building native extensions. This could take a while...
ERROR: Error installing redis-dump:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.7.0/gems/yajl-ruby-1.4.1/ext/yajl
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210402-27825-8hf99y.rb extconf.rb
creating Makefile
current directory: /var/lib/gems/2.7.0/gems/yajl-ruby-1.4.1/ext/yajl
make "DESTDIR=" clean
current directory: /var/lib/gems/2.7.0/gems/yajl-ruby-1.4.1/ext/yajl
make "DESTDIR="
compiling yajl.c
make:gcc:命令未找到
make: *** [Makefile:245:yajl.o] 错误 127
make failed, exit code 2
Gem files will remain installed in /var/lib/gems/2.7.0/gems/yajl-ruby-1.4.1 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/yajl-ruby-1.4.1/gem_make.out
找了好久没发现是哪里出了问题,之前一直按照ERROR: Error installing redis-dump:
ERROR: Failed to build gem native extension.来检索的,试了好多种方法没效果。后来无意间看见gcc那行,才发现可能是make、gcc未安装(脑海里一直以为gcc以前安装过)。
键入sudo apt install build-essential 该命令将安装一堆新包,包括gcc,g ++和make。
再次尝试gem install redis-dump