【问题标题】:RVM + Ruby 1.9.3 + MacPorts Typhoeus Missing > Bundle Install stuck at FFIRVM + Ruby 1.9.3 + MacPorts Typhoeus Missing > Bundle Install 卡在 FFI
【发布时间】:2014-03-01 07:41:59
【问题描述】:

我在 OSC Mavericks 上使用 MacPorts 安装了 Ruby 版本管理器 RVM。我试图更新在 ruby​​ 上运行的 WPScan。我正在尝试进行更新:

ruby wpscan.rb --update 当我遇到这个错误时: 在这台机器上可用的 gem 中找不到 gem 'typhoeus (>= 0.6.3) ruby​​'。 我以前有这个错误。因此,运行捆绑安装。然后我遇到了其他错误:

sudo bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Installing ffi (1.9.3) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/jasper/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb 
checking for ffi_call() in -lffi... yes
-----------------cut ----------------
checking for ffi_prep_cif_var()... yes
creating extconf.h
creating Makefile

make
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
Call.c:303:5: warning: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in C99 [-Wimplicit-function-declaration]
    rbffi_thread_blocking_region(call_blocking_function, data, (void *) -1, NULL);
    ^
./Thread.h:78:39: note: expanded from macro 'rbffi_thread_blocking_region'
# define rbffi_thread_blocking_region rb_thread_call_without_gvl
                                      ^
1 warning generated.
compiling ClosurePool.c
compiling DataConverter.c
compiling DynamicLibrary.c
compiling ffi.c
compiling Function.c
Function.c:479:33: warning: incompatible pointer types passing 'VALUE (void *)' to parameter of type 'void *(*)(void *)' [-Wincompatible-pointer-types]
        rb_thread_call_with_gvl(callback_with_gvl, &cb);
                                ^~~~~~~~~~~~~~~~~
Function.c:102:46: note: passing argument to parameter 'func' here
extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
                                             ^
Function.c:563:9: warning: implicit declaration of function 'rb_thread_call_without_gvl' is invalid in C99 [-Wimplicit-function-declaration]
        rb_thread_call_without_gvl(async_cb_wait, &w, async_cb_stop, &w);
        ^
Function.c:738:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
3 warnings generated.
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByReference.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
linking shared-object ffi_c.bundle

make install
make: /opt/local/bin/gmkdir: No such file or directory
make: [/Users/jasper/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/gems/1.9.1/gems/ffi-1.9.3/lib/ffi_c.bundle] Error 1 (ignored)
/opt/local/bin/ginstall -c -m 0755 ffi_c.bundle /Users/jasper/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/gems/1.9.1/gems/ffi-1.9.3/lib
make: /opt/local/bin/ginstall: No such file or directory
make: *** [/Users/jasper/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/gems/1.9.1/gems/ffi-1.9.3/lib/ffi_c.bundle] Error 1


Gem files will remain installed in /Users/jasper/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/gems/1.9.1/gems/ffi-1.9.3 for inspection.
Results logged to /Users/jasper/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/gems/1.9.1/gems/ffi-1.9.3/ext/ffi_c/gem_make.out
An error occurred while installing ffi (1.9.3), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.3'` succeeds before bundling.

我确实有 /opt/local/bin/gmdir。我自己添加了它,但错误仍然存​​在,然后有一些关于其他似乎不存在的目录的警告和错误。为什么脚本不创建它们?有什么简单的方法可以解决这些错误,以便我可以运行我最喜欢的 WP 扫描仪?

注意,我认为 RVM 可以在没有 MacPorts 的情况下工作...但它正在 MacPorts 中寻找目录。

【问题讨论】:

    标签: ruby wordpress rvm macports


    【解决方案1】:

    gmkdir 是 GNU Core Utilities 的一部分。

    您可以使用命令sudo port install coreutils 安装它们。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-17
      • 2013-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多