I don't know which version you were using at the time, but I had my Lexmark X5150 printer working on Ubuntu 9.04, and now also, with some effort, on 9.10. I will report my experience in getting my printer printing again, for people dealing with the same problem.
With the z55 driver you should be fine. Install it with the help of "HOWTO: Lexmark Printers" or "HOWTO: Install Lexmark Z55 printer". Probably, when checking whether the printer backend works, e.g.:
you will get this error:
After some Googling I found out that libstdc++.so.5 was replaced with a newer version in Karmic. I solved it with the instructions found on bootstrapping.wordpress.com, with a little modification, which resulted in this:
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Perhaps you could also try to symlink to the new libstdc 6 version, but I don't know if it will work or not. Note that after adding the libstdc++, I was not getting any output when testing the printer backend again, but this doesn't seem to be a problem.
dpkg-deb -x ia32-libs_2.7ubuntu6.1_amd64.deb ia32-libs
sudo cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib/
sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5
But after this I was still getting the "could not execute a filter" / "Unable to execute /usr/lib/cups/filter/rastertoz55: insecure file permissions (0100755)" error after trying to print a testpage, which also shows up in /var/logs/cups/error_log. To solve it I followed the advice of KIAaze and chmod'ed two files:
Since it was still giving the insecure file permissions error I also chown'ed the raster file to root:
sudo chmod +x /usr/lib/cups/backend/z55
sudo chmod +x /usr/lib/cups/filter/rastertoz55
It scared the hell out of me when my printer started to make noise after pushing the "print testpage" button, since I did not expect anything to happen. But it works! Now I'm the proud owner of an Ubuntu testpage, and more important, a working X5150 printer! Perhaps this information will be helpful to other people as well.
sudo chown root:root /usr/lib/cups/filter/rastertoz55
(Please note I'm not an Ubuntu or IT professional, but just someone with a trial and error attitude, who has access to Google and some very helpful ubuntu form posts. So thanks to the ubuntu community!)