ext widow可以旋转吗

Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them, it only takes a minute:
when trying to install bson_ext i see the error...installing json gem works fine which also requires building native extensions - i have tried everything see similar questions with no good answer
$ gem install bson_ext
Temporarily enhancing PATH to include DevKit...
Building native extensions.
This could take a while...
Error installing bson_ext:
ERROR: Failed to build gem native extension.
c:/Ruby193/bin/ruby.exe extconf.rb
checking for asprintf()... no
checking for ruby/st.h... yes
checking for ruby/regex.h... yes
checking for ruby/encoding.h... yes
creating Makefile
generating cbson-i386-mingw32.def
compiling bson_buffer.c
compiling cbson.c
cbson.c:25:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
make: *** [cbson.o] Error 1
Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/bson_ext-
1.11.1 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/bson_ext-1.11.1/ext/cbson/
gem_make.out
$ gem install json
Temporarily enhancing PATH to include DevKit...
Building native extensions.
This could take a while...
Successfully installed json-1.8.1
1 gem installed
Installing ri documentation for json-1.8.1...
Installing RDoc documentation for json-1.8.1...
According to
&arpa/inet.h& is not a windows library, so winsock2.h should be used instead.
To change this reference, I've done the following**:
Go to your installation folder (c:/Ruby193/lib/ruby/gems/1.9.1/gems/bson_ext-1.11.1)
Drill down a level into the cbson folder and find cbson.c
Open cbson.c in your favorite text editor and find the line that reads #include "&arpa/inet.h&"
Change that line to #include winsock2.h
Open a command prompt, browse to the installation folder, and run gem build bson_ext.gemspec
Move the newly-created .gem file someplace safe (%userprofile%\Desktop, for example).
Go up to the gem folder and delete the entire bson_ext folder
Back in your command prompt window, change directory to wherever you placed the newly-created .gem file (cd %userprofile%\Desktop, if you're following these steps exactly)
Run gem install bson_ext-1.11.1.gem --local and the gem should now install successfully.
** Huge caveat: I am just running through a mongodb for rails tutorial and I don't have any functioning code with which to test this. While this removes the installation error, I have no way of determining if this fix is a complete one. This library reference is new for the 1.11.1 release. If you install version 1.10.2 this issue will not occur (gem install bson_ext -v 1.10.2). I'll leave it to you to decide which solution makes more sense for you.
Edit: Based on
on github, a better fix would be to change that include to read like this:
#ifdef _WIN32
#include &winsock2.h&
#include &arpa/inet.h&
is not needed when compiling on DevKit.
To prevent this error it is enough to create an empty file at the expected location. If your DevKit was installed in C:\DevKit, the file would be expected at C:\DevKit\mingw\include\arpa\inet.h
This should also fix other native gems. The reasons is, that definitions usually coming from arpa/inet.h are already coming from other include files that are automatically included most of the time.
Use this command
gem update --system 2.3.0
I just updated my gem to an older version (from 2.4.6 to 2.3) and that worked.
2,67311127
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled您所在的位置: &
&Ext2explore(system.img解包工具) 2.2.71 绿色版
Ext2explore(system.img解包工具) 2.2.71 绿色版
ext2explore中文版
好评:89.06%
坏评:10.94%
系统增强小分类
绿色软件排行榜
下载周排行榜
52.12 MB/简体中文/9337
47.07 MB/简体中文/41329
92.44 MB/简体中文/2438
16.82 MB/简体中文/2211
2.07 MB/简体中文/5682
47.81 MB/简体中文/2736
1.75 MB/简体中文/3725
软件排行榜

我要回帖

更多关于 windows读取ext4 的文章

 

随机推荐