我正在尝试从我已读取的目录中的源代码构建R,编写exec访问权限(在unix服务器上)。我已经尝试用谷歌搜索这个特殊的错误并搜索SO无济于事。我觉得这是愚蠢的事。
我已将源代码(R-3.0.2)解压缩到该目录/home/rmgzshd/R-3.0.2
并成功运行./configure --prefix=$HOME/R-3.0.2
(我认为)并且我需要依赖项,例如./configure消息以:
R is now configured for x86_64-unknown-linux-gnu
Source directory: .
Installation directory: /home/rmgzshd/R-3.0.2
C compiler: gcc -std=gnu99 -g -O2
Fortran 77 compiler: gfortran -g -O2
C++ compiler: g++ -g -O2
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler:
Interfaces supported: X11
External libraries: readline
Additional capabilities: PNG, JPEG, NLS
Options enabled: shared BLAS, R profiling
Recommended packages: yes
我似乎在同一个./configure
目录中有正确的目录结构和Makefile:
ChangeLog configure etc m4 Makefile.bak Makefrag.cc_lo NEWS.0 po SVN-REVISION VERSION-NICK
config.log configure.ac INSTALL Makeconf Makefile.fw Makefrag.cxx NEWS.1 README tests
config.site COPYING lib64 Makeconf.in Makefile.in Makefrag.m NEWS.2 share tools
config.status doc libtool Makefile Makefrag.cc NEWS NEWS.pdf src VERSION
然而,make
命令失败并显示一条似乎错误的消息......(因为m4存在)
/bin/sh: line 1: cd: m4: No such file or directory
我还尝试了一个更简单的./configure
,但没有--prefix
后跟make
,但这会使我的安装目录/usr/bin
失败并出现同样的错误。
有没有人遇到过这个问题? Source目录:例如是.
吗?
THX
编辑按照下面的建议我尝试了make distclean
,但很明显路径都是以某种方式被堵塞了,尽管我得到了./configure
消息说的话:
make distclean
/bin/sh: line 1: cd: tests: No such file or directory
/bin/sh: line 1: cd: src: No such file or directory
/bin/sh: line 1: cd: share: No such file or directory
/bin/sh: line 1: cd: etc: No such file or directory
/bin/sh: line 1: cd: doc: No such file or directory
/bin/sh: line 1: cd: tools: No such file or directory
/bin/sh: line 1: cd: m4: No such file or directory
但它们都在/home/rmgzshd/R-3.0.2
中,我执行命令......
答案 0 :(得分:1)
我通过将CDPATH
的值从CDPATH=/some/location
更改为CDPATH=
来解决了同样的问题。
或者,如果您需要保留CDPATH
中的值,只需将.
添加到CDPATH=.:/some/location
。
如果您想了解有关此行为的更多信息,请访问https://unix.stackexchange.com/questions/112363/is-cdpath-behavior-broken-in-bourne-shell-bin-sh