A symlink should be created for libib_util.so in /usr/lib to /usr/lib/firebird/2.1/lib/ that is why whithout it you need to specify the full library path when declaring a udf function this is the related bug from ubuntu https://bugs.edge.launchpad.net/ubuntu/+source/firebird2.1/+bug/419198