Question

I am trying to run the portuguese trained version if MXPOSt which i downloaded from: http://www.nilc.icmc.usp.br/nilc/tools/nilctaggers.html

It seems like I am having a classpath issue but everything seems to check out. At this point I am confused and hoping someone can help. Here is my terminal out below. Thank you guys as always in advance!

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$
Was it helpful?

Solution

The script was apparently edited on a Windows machine, which uses CRLF as the line endings, instead of Unix's LF. You need to remove those extraneous CR characters. If you have the dos2unix program, use it, otherwise:

tr -d '\r' < mxpost > mxpost.fixed
mv mxpost.fixed mxpost
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top