微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

我想安装 rrdiff gem 但它给我的错误是 lrsync 不存在,如何为 mac apple m1 芯片安装和配置 lrsync?

如何解决我想安装 rrdiff gem 但它给我的错误是 lrsync 不存在,如何为 mac apple m1 芯片安装和配置 lrsync?

我想安装 rrdiff gem 但它给我的错误lrsync 不存在,如何为 mac apple m1 芯片安装和配置 lrsync 以便为 rrdiff 安装 gem 正常工作?

这里是 lrsync:

lrsync github link

这里是 mkmf.log 和 gem_make.out 文件

mkmf.log:

have_library: checking for -lrsync... -------------------- no

"gcc -o conftest -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/-darwin20 -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/backward -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0 -I.  -I/Opt/homebrew/opt/libyaml/include -I/Opt/homebrew/opt/libksba/include -I/Opt/homebrew/opt/readline/include -I/Opt/homebrew/opt/zlib/include -I/Opt/homebrew/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -Wno-error=implicit-function-declaration -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens  -fno-common -pipe conftest.c  -L. -L/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@1.1/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@1.1/lib     -lruby.2.7   "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc,char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

"gcc -o conftest -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/-darwin20 -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/backward -I/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0 -I.  -I/Opt/homebrew/opt/libyaml/include -I/Opt/homebrew/opt/libksba/include -I/Opt/homebrew/opt/readline/include -I/Opt/homebrew/opt/zlib/include -I/Opt/homebrew/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -Wno-error=implicit-function-declaration -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens  -fno-common -pipe conftest.c  -L. -L/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@1.1/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@1.1/lib     -lruby.2.7 -lrsync   "
ld: library not found for -lrsync
clang: error: linker command Failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*toP*/
 4: extern int t(void);
 5: int main(int argc,char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     int (* volatile tp)(void)=(int (*)(void))&t;
 9:     printf("%d",(*tp)());
10:   }
11: 
12:   return !!argv[argc];
13: }
14: 
15: int t(void) { ; return 0; }
/* end */

--------------------

gem_make.out:

current directory: /Users/aashishgangwani/.rvm/gems/ruby-2.7.1/bundler/gems/rrdiff-6742766bf0e0/ext/rrdiff
/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/bin/ruby -I /Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0 -r ./siteconf20210727-47852-a9wtwt.rb extconf.rb
checking for -lrsync... no
*** extconf.rb Failed ***
Could not create Makefile due to some reason,probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/aashishgangwani/.rvm/rubies/ruby-2.7.1/bin/$(RUBY_BASE_NAME)
    --with-rsync-dir
    --without-rsync-dir
    --with-rsync-include
    --without-rsync-include=${rsync-dir}/include
    --with-rsync-lib
    --without-rsync-lib=${rsync-dir}/lib
    --with-rsynclib
    --without-rsynclib
extconf.rb:3:in `<main>': unhandled exception

To see why this extension Failed to compile,please check the mkmf.log which can be found here:

  /Users/aashishgangwani/.rvm/gems/ruby-2.7.1/bundler/gems/extensions/-darwin-20/2.7.0/rrdiff-6742766bf0e0/mkmf.log

extconf Failed,exit code 1

rrdif mkmf.log file

rrdiff gem_make.out file

我尝试克隆 lrsync 的存储库并在文件夹中执行“make”操作,但这并不能解决我的问题。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。