尝试安装' rworldmap'时出错和依赖'字段'

时间:2018-02-14 15:55:09

标签: r field rworldmap

尝试安装' rworldmap'我收到错误说"没有名为' fields'"的包。所以我尝试安装'字段'当我这样做时说成功解压缩并检查MD5总和,但随后出现错误,说编译失败。有什么建议?这正是出现的结果:

There is a binary version available but the source version
  is later:
       binary source needs_compilation
fields    9.0    9.6              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘fields’

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0100 3188k  100 3188k    0     0  3720k      0 --:--:-- --:--:-- --:--:-- 3720k
* installing *source* package ‘fields’ ...
** package ‘fields’ successfully unpacked and MD5 sums checked
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c ExponentialUpperC.c -o ExponentialUpperC.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c addToDiagC.c -o addToDiagC.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c compactToMatC.c -o compactToMatC.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c expfnC.c -o expfnC.o
gfortran-4.8   -fPIC  -g -O2  -c fieldsF77Code.f -o fieldsF77Code.o
make: gfortran-4.8: No such file or directory
make: *** [fieldsF77Code.o] Error 1
ERROR: compilation failed for package ‘fields’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/fields’
Warning in install.packages :
  installation of package ‘fields’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/vx/ffhh4_sj0hj810kjht02f9bc0000gn/T/RtmpncjRcs/downloaded_packages’

1 个答案:

答案 0 :(得分:0)

看来您没有正确安装DECLARE @table TABLE (ID INT, Value VARCHAR(50)) INSERT INTO @table (ID, Value) VALUES (1,'Test'), (2,'Another Test'), (3, NULL) SELECT * FROM @table WHERE value = NULL SELECT * FROM @table WHERE Value IS NULL SELECT * FROM @table WHERE Value IS NOT NULL 。我猜这是在Mac上,所以如果你想从源代码编译,请转到安装页面并更正你的设置。这是指向Mac gfortran页面的链接:https://cran.r-project.org/bin/macosx/tools

我承认有一个关于为什么会抛出此错误的难题,因为我尝试从字段ver安装。 R版本3.4.3中的9.6源显示没有可见的"努力"编译任何fortran代码。也许Fortran消息没有发送到控制台?还担心你可能正在使用过时版本的R(3.2)。那是两年之久,可能与当前版本的软件包不兼容。较旧版本的tools位于: https://cran.r-project.org/src/contrib/Archive/fields/