> install.packages('e1071')
trying URL 'https://cran.rstudio.com/src/contrib/e1071_1.6-8.tar.gz'
Content type 'application/x-gzip' length 581513 bytes (567 KB)
==================================================
downloaded 567 KB
* installing *source* package ‘e1071’ ...
** package ‘e1071’ successfully unpacked and MD5 sums checked
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... configure: error: cannot
run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: configuration failed for package ‘e1071’
* removing ‘/anaconda3/lib/R/library/e1071’
Warning in install.packages :
installation of package ‘e1071’ had non-zero exit status
我已在终端上检查过,gcc已安装并更新。 我还尝试https://cran.r-project.org/web/packages/e1071/index.html手动下载最新版本和以前版本,并将它们安装在R控制台上。错误仍然存在。 我该如何解决?
谢谢!
答案 0 :(得分:0)
通过Anaconda使用RStudio时遇到此错误。我刚刚从R网站重新下载了RStudio,现在错误消失了,并且e1071可以正常安装。