gem install libv8-3.16.14.5失败

文章详细记录了解决GemLock项目中指定libv8版本3.16.14.5无法正常安装的问题过程,通过修改命令参数成功解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天新加入一个项目  GemLock 中指定的libv8的版本是3.16.14.5,怎么都装不了

贴上错误:

==>ERROR:  Error installing libv8:
ERROR: Failed to build gem native extension.


    /usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.5
Using compiler: /usr/bin/c++ (GCC version 4.8.3)
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/builder.rb:28:in `make_flags': undefined method `include?' for nil:NilClass (NoMethodError)
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/builder.rb:56:in `block in build_libv8!'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/builder.rb:49:in `chdir'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/builder.rb:49:in `build_libv8!'
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'

extconf failed, exit code 1


Gem files will remain installed in /usr/local/rvm/gems/ruby-2.0.0-p247/gems/libv8-3.16.14.5 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.0.0-p247/extensions/x86_64-linux/2.0.0/libv8-3.16.14.5/gem_make.out


后来看了网上下gem文件夹下

libv8-3.16.14.3-x86_64-linux      
libv8-3.16.14.5                     
libv8-3.16.14.7-x86_64-linux  

之前装的libv8都有后缀 linux后缀 本人操作系统64位Fedora 猜想与操作系统有关

网上找到一条命令:gem install libv8-3.11.8.17.gem -- --with-system-v8 

最后根据提示修改用解决: gem install libv8 -v '3.16.14.5' -- --with-system-v8这条命令 成功安装


]# gem install libv8 -v '3.16.14.5' -- --with-system-v8
Building native extensions with: '--with-system-v8'
This could take a while...
Successfully installed libv8-3.16.14.5
Parsing documentation for libv8-3.16.14.5
Installing ri documentation for libv8-3.16.14.5
Done installing documentation for libv8 after 0 seconds
1 gem installed

pi@rk3318-box:/root$ ~/klipper/scripts/install-octopi-dependencies.sh bash: /home/pi/klipper/scripts/install-octopi-dependencies.sh: No such file or directory pi@rk3318-box:/root$ cd /klipper/scripts/ bash: cd: /klipper/scripts/: No such file or directory pi@rk3318-box:/root$ cd ~ pi@rk3318-box:~$ ls crowsnest kiauh-backups klippy-env OctoPrint fluidd klipper moonraker printer_data fluidd-config KlipperScreen moonraker-env timelapse kiauh klipper_tmc_autotune moonraker-timelapse pi@rk3318-box:~$ cd /klipper/scripts/ bash: cd: /klipper/scripts/: No such file or directory pi@rk3318-box:~$ cd /klipper/scripts bash: cd: /klipper/scripts: No such file or directory pi@rk3318-box:~$ cd /klipper bash: cd: /klipper: No such file or directory pi@rk3318-box:~$ ls crowsnest kiauh-backups klippy-env OctoPrint fluidd klipper moonraker printer_data fluidd-config KlipperScreen moonraker-env timelapse kiauh klipper_tmc_autotune moonraker-timelapse pi@rk3318-box:~$ cd klipper pi@rk3318-box:~/klipper$ ls config COPYING docs klippy lib Makefile README.md scripts src test pi@rk3318-box:~/klipper$ cd scripts/ pi@rk3318-box:~/klipper/scripts$ ls avrsim.py flash-sdcard.sh klipper-mcu.service buildcommands.py flash_usb.py klipper-pru-start.sh calibrate_shaper.py graph_accelerometer.py klipper-start.sh canbus_query.py graph_extruder.py klipper-uninstall.sh check-gcc.sh graph_motion.py klippy-requirements.txt checkstack.py graph_shaper.py logextract.py check_whitespace.py graphstats.py make_version.py check_whitespace.sh graph_temp_sensor.py motan ci-build.sh install-arch.sh parsecandump.py ci-install.sh install-beaglebone.sh spi_flash Dockerfile install-centos.sh stepstats.py dump_mcu.py install-debian.sh test_klippy.py flash-ar100.py install-octopi.sh update_chitu.py flash-linux.sh install-ubuntu-18.04.sh update_mks_robin.py flash-pru.sh install-ubuntu-22.04.sh whconsole.py pi@rk3318-box:~/klipper/scripts$
最新发布
06-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值