1

我的问题是关于在 termux 上使用 Ruby 2.7.0(通过 rbenv 构建):-

我正在看:-

FFI::NotFoundError: Function 'getdtablesize' not found in [libc.so]当我尝试运行时rake,我已经在网上搜索过,但到目前为止还没有找到很多关于这个错误的信息。

堆栈跟踪:-

FFI::NotFoundError: Function 'getdtablesize' not found in [libc.so]
/data/data/com.termux/files/home/Projects/myapp/.bundle/ruby/2.7.0/gems/ffi-1.11.3/lib/ffi/library.rb:273:in `attach_function'
/data/data/com.termux/files/home/Projects/myapp/.bundle/ruby/2.7.0/gems/ethon-0.12.0/lib/ethon/libc.rb:16:in `<module:Libc>'
/data/data/com.termux/files/home/Projects/myapp/.bundle/ruby/2.7.0/gems/ethon-0.12.0/lib/ethon/libc.rb:6:in `<module:Ethon>'
/data/data/com.termux/files/home/Projects/myapp/.bundle/ruby/2.7.0/gems/ethon-0.12.0/lib/ethon/libc.rb:1:in `<main>'
/data/data/com.termux/files/home/Projects/myapp/.bundle/ruby/2.7.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/data/data/com.termux/files/home/Projects/myapp/.bundle/ruby/2.7.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/data/data/com.termux/files/home/Projects/myapp/.bundle/ruby/2.7.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'```
4

1 回答 1

1

似乎该getdtablesize功能(由 ethon gem 使用)已从最近的 Android 发行版的 libc 中删除,显然是在被弃用一段时间之后。

因此,要在您的 Android 发行版中使用 ethon gem,您需要:

  • 使 gem 不再使用该getdtablesize功能,或者
  • 为您的项目使用仍然提供该功能的不同 libc,例如GNU 项目的 libc
于 2020-02-16T21:05:08.047 回答