我正试图为这个错误找到一个解决方案。几年前有过一篇文章,但一直没有找到解决办法。让我尝试提供更多细节:
这是错误
textstat_freq(testing.dfm, n = 10, groups = "ByNmbr")
Error in textstat_freq(testing.dfm, n = 10, groups = "ByNmbr") :
could not find function "textstat_freq"安装quanteda时会出现错误。
我不知道这些是否有关。这是我的例子:
install.packages("quanteda")
also installing the dependency ‘RcppArmadillo’
There is a binary version available but the source version is later:
binary source needs_compilation
RcppArmadillo 0.11.2.4.0 0.11.4.0.1 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.2/quanteda_3.2.3.tgz'
Content type 'application/x-gzip' length 4191430 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
The downloaded binary packages are in
/var/folders/w5/hsxqtj6n32qbq0j4409h6kbm0000gn/T//Rtmp6seSBH/downloaded_packages
installing the source package ‘RcppArmadillo’
trying URL 'https://cran.rstudio.com/src/contrib/RcppArmadillo_0.11.4.0.1.tar.gz'
Content type 'application/x-gzip' length 1369973 bytes (1.3 MB)
==================================================
downloaded 1.3 MB
* installing *source* package ‘RcppArmadillo’ ...
** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
** using staged installation
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 how to run the C++ preprocessor... clang++ -arch arm64 -std=gnu++14 -E
checking whether the compiler supports GNU C++... (cached) yes
checking whether clang++ -arch arm64 -std=gnu++14 accepts -g... (cached) yes
checking for clang++ -arch arm64 -std=gnu++14 option to enable C++11 features... (cached) none needed
checking whether we have a suitable tempdir... /var/folders/w5/hsxqtj6n32qbq0j4409h6kbm0000gn/T
checking whether R CMD SHLIB can already compile programs using OpenMP... no
checking whether g++ version is sufficient... almost
configure: WARNING: Compiler self-identifies as being compliant with GNUC extensions but is not g++.
checking for macOS... found
checking for macOS Apple compiler... not found
checking for clang compiler... found
checking for OpenMP compatible version of clang... not found
configure: WARNING: OpenMP unavailable and turned off.
checking LAPACK_LIBS... R-supplied partial LAPACK found
configure: WARNING: Some complex-valued LAPACK functions may not be available
configure: creating ./config.status
config.status: creating inst/include/RcppArmadilloConfigGenerated.h
config.status: creating src/Makevars
** libs
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -I../inst/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppArmadillo.cpp -o RcppArmadillo.o
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -I../inst/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -I../inst/include -fPIC -falign-functions=64 -Wall -g -O2 -c fastLm.cpp -o fastLm.o
clang++ -arch arm64 -std=gnu++11 -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 RcppArmadillo.so RcppArmadillo.o RcppExports.o fastLm.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.6.0/12.0.1 -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath -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.6.0/12.0.1'
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: *** [RcppArmadillo.so] Error 1
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo’
Warning in install.packages :
installation of package ‘RcppArmadillo’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/w5/hsxqtj6n32qbq0j4409h6kbm0000gn/T/Rtmp6seSBH/downloaded_packages’quanteda版本检查:
> library(quanteda)
Package version: 3.2.3
Unicode version: 14.0
ICU version: 70.1
Parallel computing: 8 of 8 threads used.
See https://quanteda.io for tutorials and examples.(这是一个虚拟文本,这是一个虚拟文本,因为堆栈不允许我发布,如果我的帖子主要是代码,我不知道还可以添加什么,这是一个虚拟文本,这是一个虚拟文本)。
发布于 2022-10-04 13:48:24
https://stackoverflow.com/questions/73947996
复制相似问题