Thursday, July 2, 2009

jai & tail: cannot open `+215' for reading: No such file or directory

tail: cannot open `+215' for reading: No such file or director

I already had this once and I was able to forget. When installing jai_imageio in your jdk you might get this.
For example it happend me with jai_imageio-1_1-lib-linux-amd64-jdk.bin but I remember last time it was on a 32 bit.

The fix is really easy with sed (do not use a text editor to change, else the binary content of the installer will get corrupted). You just have to change the tail command syntax to work:

sed s/+215/-n+215/ jai_imageio-1_1-lib-linux-amd64-jdk.bin > jai_imageio-1_1-lib-linux-amd64-jdk-fixed.bin

Then run sh jai_imageio-1_1-lib-linux-amd64-jdk-fixed.bin

as a gentle anonymous hacker stated:

export _POSIX2_VERSION=199209

also works and is nicer than the idea to change the installation file. Thanks!


jimnz111 said...

Brillian thanks :) Works a treat with 32bit/64bit

Anonymous said...


Anonymous said...

It works! Thanks

Anonymous said...

seems that



also works.

Azijn said...

Solution in post worked quite well. Thx.

Trails said...

You, sir, are a gentleman and a scholar.

kshams said...

Thank you so much. This saved us a lot of headache!

Anonymous said...

Thanks for that!

Jason said...

Tried everything else for hours until I found this. Worked great, thanks!

Unknown said...

3 years later: Thank you!!!

Unknown said...

Well done. Thanks.

Anonymous said...

You saved me from having to change HUNDERDS of tail commands in 3rd party scripts. Be praised!!!