1.) : No such file or directoryr.pl

epoch@Debian-60-squeeze-64-LAMP:~/epochserver$ ./epoch.sh
: No such file or directoryr.pl

This error message is thrown if there are invisble extra characters in the epoch.sh like line ending characters (in this case) or something like that.
This happens normally if you edit Linux config files via your FTP directly on your Windows PC. This is caused as far as I know if the changed files are transferred via binary mode in FTP.
Or if you edit the files on Windows and then upload them to your Linux the same will happen as you saved the files under Windows.

To avoid these issues edit files directly on your Linux box with a text editor of your choice (e.g. nano, vim, emacs,…).

How to fix this:
There are 2 tools dos2unix and unix2dos to convert files from say Linux file mode to Dos/Windows file mode.
So if you get the error message above, do a: dos2unix epoch.sh which will erase all invisible Windows control characters and the error is gone.

Means, if you want to edit your config files on Windows and then upload them to your server, always use ‘dos2unix file’ afterwards. It does not matter if the file was already in Linux format if you use dos2unix.
epoch@Debian-60-squeeze-64-LAMP:~/epochserver$ dos2unix epoch.sh
dos2unix: converting file epoch.sh to UNIX format …

If you do NOT have the commands, install the package dos2unix

Category: Common Issues

← 1.) : No such file or directoryr.pl