我在Apple Silicon上使用macOS Venture 13.5
我想在我的R-Shiny WebApp中安装一个名为ggmsa的软件包:http://yulab-smu.top/ggmsa/index.html
因为它不再是我用的CRAN:
if (!requireNamespace("devtools", quietly=TRUE))
install.packages("devtools")
devtools::install_github("YuLab-SMU/ggmsa")
字符串
但我总是得到同样的错误:
22 warnings generated.
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/moritz/Library/R/arm64/4.1/library/Rcpp/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c init.c -o init.o
clang++ -arch arm64 -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o RcppEigen.so RcppEigen.o RcppExports.o fastLm.o init.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.2.0/11.0.0 -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.2.0/11.0.0'
ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [RcppEigen.so] Error 1
ERROR: compilation failed for package ‘RcppEigen’
* removing ‘/Users/moritz/Library/R/arm64/4.1/library/RcppEigen’
* installing *source* package ‘ash’ ...
** package ‘ash’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
/opt/R/arm64/bin/gfortran -mtune=native -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c ash.f -o ash.o
make: /opt/R/arm64/bin/gfortran: No such file or directory
make: *** [ash.o] Error 1
ERROR: compilation failed for package ‘ash’
* removing ‘/Users/moritz/Library/R/arm64/4.1/library/ash’
* installing *source* package ‘proj4’ ...
** package ‘proj4’ successfully unpacked and MD5 sums checked
** using staged installation
checking whether pkg-config knows about proj... ./configure: line 2183: pkg-config: command not found
no
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether clang++ -arch arm64 -std=gnu++14 accepts -g... yes
checking for clang++ -arch arm64 -std=gnu++14 option to enable C++11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for proj_api.h... no
checking with ACCEPT_USE_OF_DEPRECATED_PROJ_API_H...
checking for proj_api.h... no
checking for proj.h... no
checking for proj_get_source_crs in -lproj... no
configure: Retrying with pkg-config --static
./configure: line 3070: pkg-config: command not found
checking for proj_get_source_crs in -lproj... no
configure: PROJ4 API available: no
configure: PROJ6 API available: no
checking whether to require PROJ6 API... no
configure: error: Cannot find working proj.h headers and library.
*** You may need to install libproj-dev or similar! ***
ERROR: configuration failed for package ‘proj4’
* removing ‘/Users/moritz/Library/R/arm64/4.1/library/proj4’
ERROR: dependency ‘ape’ is not available for package ‘tidytree’
* removing ‘/Users/moritz/Library/R/arm64/4.1/library/tidytree’
ERROR: dependency ‘RcppEigen’ is not available for package ‘ggforce’
* removing ‘/Users/moritz/Library/R/arm64/4.1/library/ggforce’
ERROR: dependencies ‘proj4’, ‘ash’ are not available for package ‘ggalt’
* removing ‘/Users/moritz/Library/R/arm64/4.1/library/ggalt’
ERROR: dependencies ‘ape’, ‘tidytree’ are not available for package ‘treeio’
* removing ‘/Users/moritz/Library/R/arm64/4.1/library/treeio’
ERROR: dependencies ‘ape’, ‘tidytree’, ‘treeio’ are not available for package ‘ggtree’
* removing ‘/Users/moritz/Library/R/arm64/4.1/library/ggtree’
The downloaded source packages are in
‘/private/var/folders/ry/xg2ddn7n1bd9m59b2sf_4fg80000gn/T/RtmppGYg6o/downloaded_packages’
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/ry/xg2ddn7n1bd9m59b2sf_4fg80000gn/T/RtmppGYg6o/remotesea204ef0975a/YuLab-SMU-ggmsa-f1e62e0/DESCRIPTION’ ...
─ preparing ‘ggmsa’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘ggmsa_1.3.4.tar.gz’
Installing package into ‘/Users/moritz/Library/R/arm64/4.1/library’
(as ‘lib’ is unspecified)
ERROR: dependencies ‘ggalt’, ‘ggforce’, ‘ggtree’ are not available for package ‘ggmsa’
* removing ‘/Users/moritz/Library/R/arm64/4.1/library/ggmsa’
Warning messages:
1: In i.p(...) : installation of package ‘ape’ had non-zero exit status
2: In i.p(...) :
installation of package ‘RcppEigen’ had non-zero exit status
3: In i.p(...) : installation of package ‘ash’ had non-zero exit status
4: In i.p(...) : installation of package ‘proj4’ had non-zero exit status
5: In i.p(...) :
installation of package ‘tidytree’ had non-zero exit status
6: In i.p(...) :
installation of package ‘ggforce’ had non-zero exit status
7: In i.p(...) : installation of package ‘ggalt’ had non-zero exit status
8: In i.p(...) : installation of package ‘treeio’ had non-zero exit status
9: In i.p(...) : installation of package ‘ggtree’ had non-zero exit status
10: In i.p(...) :
installation of package ‘/var/folders/ry/xg2ddn7n1bd9m59b2sf_4fg80000gn/T//RtmppGYg6o/fileea201d213b95/ggmsa_1.3.4.tar.gz’ had non-zero exit status
>
型
Main Part:pkg-config:command not found And:configure:error:Cannot find working proj. h headers and library.
我通过HomeBrew安装了pkg-config和proj我做错了什么?或者我错过了什么?
我还尝试指定配置包的路径:in nano ~/.zshrc:export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"
有人有什么想法吗?如果你需要更多的信息,随时询问:)
1条答案
按热度按时间ig9co6j11#
尝试安装自制软件(参见here)。并按照指示将
brew
添加到.ZPROFILE。然后启动新的终端会话并运行字符串