我正在尝试修改 OSX 中的 .tcshrc 文件以包含用于安装 GNURadio 的 shell 环境变量。但是,它返回给我这样的错误消息
“-bash:/Users/admin/.tcshrc:第 22 行:语法错误:文件意外结束”
修改后的tcshrc文件如下
if (-r /opt/local/bin/port) then
setenv LDFLAGS "-L/opt/local/lib ${LDFLAGS}"
setenv PATH ${HOME}/bin:/opt/local/bin:/opt/local/sbin:${PATH}
setenv MANPATH /opt/local/share/man:${MANPATH}
setenv INFOPATH /opt/local/share/info:${INFOPATH}
setenv PKG_CONFIG_PATH /opt/local/lib/pkgconfig:${PKG_CONFIG_PATH}
endif
# Gnuradio source directory (set up for installing gnuradio in $GR/local/)
setenv GR $HOME/gnuradio
setenv GR_INSTALL ${GR}/local
setenv LDFLAGS "-L${GR_INSTALL}/lib ${LDFLAGS}"
setenv PKG_CONFIG_PATH ${GR_INSTALL}/lib/pkgconfig:${PKG_CONFIG_PATH}
setenv DYLD_LIBRARY_PATH ${GR_INSTALL}/lib:${DYLD_LIBRARY_PATH}
# Set up PYTHON variables
setenv PYTHON_CMD python
setenv PYTHON_VERSION `${PYTHON_CMD} -V |& sed -e 's@\.@ @2' | awk '{ print $2 }'`
setenv PYTHON_ROOT `which ${PYTHON_CMD} | sed -e s@/bin/${PYTHON_CMD}@@g`
setenv PYTHONPATH ${GR_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:${PYTHON_ROOT}/lib/python${PYTHON_VERSION}/site-packages
非常感谢您的帮助