MXPOST bash: ./mxpost: /bin/ksh^M: bad interpreter: No such file or directory
本问题已经有最佳答案,请猛点这里访问。
我试图运行葡萄牙语训练版本,如果我从以下网站下载MXPOSt:http://www.nilc.icmc.usp.br/nilc/tools/nilctaggers.html
好像我有一个类路径问题,但似乎一切都结束了。 在这一点上,我很困惑,希望有人可以提供帮助。 这是我的终端在下面。 总是提前谢谢你们!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | username@username-desktop:~$ cd MXPOST/ username@username-desktop:~/MXPOST$ ./mxpost port < text.txt >> out.txt bash: ./mxpost: /bin/ksh^M: bad interpreter: No such file or directory username@username-desktop:~/MXPOST$ sudo apt-get install ksh^M [sudo] password for username: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ksh^M E: Couldn't find any package by regex 'ksh^M' username@username-desktop:~/MXPOST$ sudo apt-get install ksh Reading package lists... Done Building dependency tree Reading state information... Done ksh is already the newest version. The following package was automatically installed and is no longer required: libpostproc52:i386 Use 'apt-get autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 262 not upgraded. username@username-desktop:~/MXPOST$ ./mxpost port < text.txt >> out.txt bash: ./mxpost: /bin/ksh^M: bad interpreter: No such file or directory username@username-desktop:~/MXPOST$ |
该脚本显然是在Windows机器上编辑的,它使用CRLF作为行结尾,而不是Unix的LF。 您需要删除那些无关的CR字符。 如果您有
1 2 3 | tr -d ' ' < mxpost > mxpost.fixed mv mxpost.fixed mxpost |