- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试在我的 Xubuntu 13.04 x64 系统上安装 bzip2-ruby gem。
我正在使用 RVM(使用 ruby 2.0.0),并通过以下命令安装:
gem install bzip2-ruby
It fails to install, and this is the output I receive (taken from the compilation log):
/home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for bzlib.h... yes
checking for BZ2_bzWriteOpen() in -lbz2... yes
creating Makefile
make
compiling bzip2.c
In file included from bzip2.c:5:0:
/home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h" [-Wcpp]
bzip2.c: In function ‘bz_find_struct’:
bzip2.c:117:71: error: ‘OpenFile’ undeclared (first use in this function)
bzip2.c:117:71: note: each undeclared identifier is reported only once for each function it appears in
bzip2.c:117:81: error: expected expression before ‘)’ token
bzip2.c: In function ‘bz_io_data_finalize’:
bzip2.c:297:13: error: unknown type name ‘OpenFile’
bzip2.c:297:31: error: ‘OpenFile’ undeclared (first use in this function)
bzip2.c:297:41: error: expected expression before ‘)’ token
bzip2.c:298:21: error: request for member ‘f’ in something not a structure or union
bzip2.c:299:28: error: request for member ‘f’ in something not a structure or union
bzip2.c:300:21: error: request for member ‘f’ in something not a structure or union
bzip2.c:302:21: error: request for member ‘f2’ in something not a structure or union
bzip2.c:303:28: error: request for member ‘f2’ in something not a structure or union
bzip2.c:304:21: error: request for member ‘f2’ in something not a structure or union
bzip2.c: In function ‘bz_writer_init’:
bzip2.c:473:9: error: unknown type name ‘OpenFile’
bzip2.c:483:13: warning: assignment from incompatible pointer type [enabled by default]
bzip2.c:483:13: warning: passing argument 1 of ‘rb_io_check_closed’ from incompatible pointer type [enabled by default]
In file included from /home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward/rubyio.h:6:0,
from bzip2.c:5:
/home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/io.h:179:6: note: expected ‘struct rb_io_t *’ but argument is of type ‘int *’
bzip2.c:484:13: warning: passing argument 1 of ‘rb_io_check_writable’ from incompatible pointer type [enabled by default]
In file included from /home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward/rubyio.h:6:0,
from bzip2.c:5:
/home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/io.h:172:6: note: expected ‘struct rb_io_t *’ but argument is of type ‘int *’
bzip2.c: In function ‘bz_reader_init’:
bzip2.c:698:13: error: unknown type name ‘OpenFile’
bzip2.c:703:13: warning: assignment from incompatible pointer type [enabled by default]
bzip2.c:703:13: warning: passing argument 1 of ‘rb_io_check_closed’ from incompatible pointer type [enabled by default]
In file included from /home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward/rubyio.h:6:0,
from bzip2.c:5:
/home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/io.h:179:6: note: expected ‘struct rb_io_t *’ but argument is of type ‘int *’
bzip2.c:704:13: warning: passing argument 1 of ‘rb_io_check_readable’ from incompatible pointer type [enabled by default]
In file included from /home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward/rubyio.h:6:0,
from bzip2.c:5:
/home/misutowolf/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/io.h:173:6: note: expected ‘struct rb_io_t *’ but argument is of type ‘int *’
bzip2.c: In function ‘bz_next_available’:
bzip2.c:779:18: warning: operation on ‘bzf->buf’ may be undefined [-Wsequence-point]
bzip2.c: In function ‘bz_reader_ungetc’:
bzip2.c:981:18: warning: operation on ‘bzf->buf’ may be undefined [-Wsequence-point]
bzip2.c: In function ‘bz_reader_ungets’:
bzip2.c:1025:18: warning: operation on ‘bzf->buf’ may be undefined [-Wsequence-point]
bzip2.c: In function ‘Init_bzip2_ext’:
bzip2.c:1726:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
make: *** [bzip2.o] Error 1
现在,我几乎没有 C/C++ 经验,所以我什至无法开始调试它正在编译的 C 代码...但是...有人有什么想法吗?我正在处理的项目需要一个 Ruby BZip2 gem 库,这是我找到的第一个库,不确定是否有任何替代方案可以尝试。
最佳答案
显然问题是这个 gem 似乎无法在 Ruby 2.0.0 上工作(至少我无法让它工作)。我通过RVM安装了1.9.3,安装后运行良好。我对 C 的了解不够,无法修复它以与 2.0.0 一起使用,所以我将在这个项目中使用 1.9.3。没什么大不了的。
关于ruby - 无法在 Xubuntu 13.04 (x64) 上编译/安装 bzip2-ruby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19438556/
为了直接以bz2格式转储数据库,我尝试使用管道直接压缩转储文件,如下: mysqldump -u userName -p myDataBase | bzip2 -c > myDump.sql.bz2
首先是一些代码: ByteArrayOutputStream bos = new ByteArrayOutputStream(); CBZip2OutputStream zos = new CBZip
我想使用 tee 命令将 bzip 命令的 stdop 重定向到日志文件,但它不起作用并且在 tee 命令中为“-a”给出错误。请查看下面的错误, > bzip2 file -c 1> tee -a
我的项目使用的是带有 bzip2 的 Boost iostream 的旧版本。我现在正在尝试升级到 Boost 1.51。起初我没有用 bzip 编译,所以很明显我让链接器大喊 libboost_bz
有什么方法可以压缩 GZip、BZip、BZip2、xz 格式的目录。我正在构建一个命令行工具(使用 bash),我需要包含这些选项。 最佳答案 像这样的命令 tar czf output.tar.g
我通过在 Scala 中进行 Python 挑战系列来惩罚自己。 现在,挑战之一是读取使用 bzip 算法压缩的字符串并输出结果。 BZh91AY&SYA\xaf\x82\r\x00\x00\x01\
我在S3中有大约200个文件,例如a_file.json.bz2,这些文件的每一行都是JSON格式的记录,但有些字段是由pickle.dumps,例如一个日期时间字段。 bzip 压缩后每个文件约 1
我在S3中有大约200个文件,例如a_file.json.bz2,这些文件的每一行都是JSON格式的记录,但有些字段是由pickle.dumps,例如一个日期时间字段。 bzip 压缩后每个文件约 1
我一直在致力于从不同类型的文件格式(例如“zip,tar,tbz,tgz”)解压缩的任务。我能够为除 tbz 之外的所有内容执行此操作,因为 apache common compress 库提供了 B
我尝试通过 phpmyadmin 导出我的数据库,我可以在没有任何压缩的情况下导出它,但是当我选择任何类型的压缩(例如 gzip、bzip 或 zip)时,它最终会出现网络错误(Chrome),源文件
我是一名优秀的程序员,十分优秀!