Zend Guard on Linux - No Such File Or Directory


Applies to:
Zend Guard 6


When trying to execute Guard 6.0.0 /bin CLI commands, you might get the following error:

$ ZendGuard-6_0_0/bin/zendenc53
ZendGuard-6_0_0/bin/zendenc53: line 5: ZendGuard-6_0_0/bin/../plugins/com.zend.guard.core.resources.linux.x86_6.0.0/resources/zendenc53: No such file or directory


Guard package actually contain 2 resource directories:

Working: ZendGuard-6_0_0/plugins/com.zend.guard.core.resources.linux.x86_6.0.0.201305051318/resources

Empty: ZendGuard-6_0_0/plugins/com.zend.guard.core.resources.linux.x86_6.0.0/resources

When Guard /bin wrappers, such as /bin/zendenc54 are parsing internal resource dir, both are found, but the Empty one is actually used.

As a result, you get a No Such File Or Directory error.


Simply rename the empty directory or - delete it, so only the working path would be found.

mv ZendGuard-6_0_0/plugins/com.zend.guard.core.resources.linux.x86_6.0.0 ZendGuard-6_0_0/plugins/com.zend.guard.core.1resources.linux.x86_6.0.0

Another approach to run the Guard 6.0.0 CLI tools natively on your syste, would be to add "ZendGuard-6_0_0/plugins/com.zend.guard.core.resources.linux.x86_6.0.0.201305051318/resources/" to your $PATH.

Additional Info

For any problems with bad ELF interpreter, which is about missing 32-bit libraries, please see related KB:

Zend Guard on Linux 64 - bad ELF interpreter

Tags: Guard, library, libraries, error, linux