-3

输入 :

echo "GOPATH=/home/chawat/Programming/GoWorkspace" >> ~/.bashrc

echo "export GOPATH" >> ~/.bashrc

echo "PATH=\$PATH:\$GOPATH/bin" >> ~/.bashrc

source ~/.bashrc

输出:

bash: /home/chawat/.bashrc: line 171: syntax error near unexpected token `newline'

bash: /home/chawat/.bashrc: line 171: `esacGOPATH=/home/chawat/Programming/GoWorkspace'

请帮助我怎么了?

4

1 回答 1

0

在您运行这些命令之前,听起来好像.bashrc没有被换行符终止。在文本编辑器中查看文件的末尾,并确保它GOPATH=/home/chawat/Programming/GoWorkspace从自己的一行开始。

于 2017-02-11T10:33:26.550 回答