我想安装rrdiff gem,但它给我的错误是lrsync不存在,如何为macapplem1芯片安装和配置lrsync,使rrdiff的gem安装正常工作?
以下是lrsync:
lrsync github链接
以下是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 */
--------------------
宝石制作:
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文件
rrdiff gem_make.out文件
我试图克隆lrsync的存储库并将其“make”到文件夹中,但这并不能解决我的问题。
暂无答案!
目前还没有任何答案,快来回答吧!