Installing Firebird 3.06 on Ubuntu 18.04.5 LTS

Thanks to my inexperience with the Ubuntu package manager, and my talent for breaking software, I managed to trash my Ubuntu installation recently to the point where it wouldn’t even boot.  It gave me the opportunity to test my backups, and I’m happy to say that re-installing Ubuntu with a restore of data, with some re-installation of apps got me pretty much back to where I was.  I did however, encounter an issue where Ubuntu would not login to the GUI.  Thankfully I eventually found this post, which solved the problem.

The original issue started around the installation of Firebird 3.0.5 for Linux. It appeared the installer needed a file which was not present on my distro.  I thought I had gotten it installed properly, then I ran into the infamous “COLLATION UNICODE_CI_AI for CHARACTER SET UTF8 is not installed” error.  I managed to get past that, but when I opened the database in an FMX app using FireDAC in local mode I got an exception “N8Firebird16status_exceptionE”.   FlameRobin would open it without issue.  If I chose Break in the exception dialog it looked for the source to The exception was in a call to isc_attach_database or isc_dsql_fetch.  I assumed it was an incompatibility between FireDAC and the standard C++ library.

It turns out I had gotten myself into a mess trying to get the libtommath file.  I broke some package references and when I tried to fix them, a slew of packages were removed.  I was warned not to continue unless I knew what I was doing, but when has that stopped me?  Also there didn’t seem to be any alternative to fix the package manager’s complaint that things were broken even if everything still seemed functional.  Ah live and learn…

This time I tried installing Firebird 3.06 thinking it was newer and might address some of the problems I had encountered….nope.  This time I used a symlink ( sudo ln -sf /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/ ) to resolve the missing libtommath.

Then I got a completely new error in the FMX deployment code.  It attempted to create a hidden folder “/home/<username>/.fmxlinux” which contains “”.  I did not invoke paserver with sudo so I didn’t have adequate permissions and got an EFCreateError exception with an empty message triggered by line 9345 of System.Classes.  I only mention that because the message should contain the filename being created and the OS error message but it did not.

After resolving the permission issue, I re-confirmed that even on my fresh Linux/Firebird install, I still get an exception when attempting to access my database, which of course pertains to the missing collation.  Since I didn’t make note of how I resolved the collation error when I installed 3.05 I can’t be sure what I did, or whether the “resolution”  did not truly work.

Reading the “Release notes for Firebird 3.06″ I saw they had upgraded the ICU libraries to v52.1 so I downloaded the package and installed it.  Re-starting Firebird the collation error was resolved and neither FireDAC or FlameRobin reported the “N8Firebird16status_exceptionE” error any longer.  Obviously whatever I did to fix the collation error when I installed Firebird 3.05 was not correct despite the fact I was no longer getting the collation exception.

I hope this helps someone else install FireBird 3.06 on Ubuntu/Debian and saves them all the time I spent searching for solutions to the myriad of issues I encountered including my own folly.

Leave a Reply