在 RStudio 中安装 readxl 时出错

Error during installation of readxl in RStudio

我使用的是 R 版本 3.4.4 (2018-03-15) 和 RStudio 版本 1.1.456,我在尝试安装 readxl 扩展时遇到此错误:

* installing *source* package ‘utf8’ ...
** package ‘utf8’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG     -Iutf8lite/src -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c as_utf8.c -o as_utf8.o
as_utf8.c:17:10: fatal error: assert.h: No such file or directory
 #include <assert.h>
          ^~~~~~~~~~
compilation terminated.

由于 R 版本过时,我遇到了这种情况。

请更新您的 R 并重试。有关更新 R 的说明,请遵循 this.

确保将 R 更新到 3.5.2。