Wednesday, July 17, 2013

GnuCash with PostgreSQL in Linux Mint

I've just got a new laptop, and need to set it up before I move to my next life. Because I have had bad experience developing in Windows with Spring Tool Suite (an Eclipse based IDE), and my next job will still require me to use Spring Framework a lot, I need an environment to explore.

The Eclipse based IDE usually getting slowed down after a Windows hibernate session and need to be restarted to get it to the right shape. Another big problem is that every so often, I have to restore the installation from a compressed file because it just crashed and irrecoverable.
I learnt that those problem doesn't show when running the IDE from Linux. Those at office, especially our department start converting their desktop to Linux but I wasn't able to do that as I still have to deal with some presales matters and WebEx.

I have decided that Linux Mint will be the main operating system I will be working on. Linux Mint is an Ubuntu derivative OS, so although it has its own repository, it also depends heavily on Ubuntu repository.

Just like in Ubuntu, installing GnuCash is just a matter of typing this command:

$ sudo apt-get install gnucash

I had a GnuCash running well on Windows, and I would like to use that in my Linux Mint without having to switch OS. When I install GnuCash the Ubuntu way (Linux Mint is a derivative of Ubuntu Linux), I was caught by surprise that it only supports the xml and sqlite3 format!
On my Windows 7, the GnuCash of the same version supports xml, mysql, and postgres.

It made me wonder, why should a GNU application not supporting PostgreSQL database in a GNU operating system, while it offers connection to the PostgreSQL database in Windows!

After a few days, scratching my head, Googling around, I finally found out that one library in Linux was missing, which is "libdbd-pgsql".

$ sudo apt-get install libdbd-pgsql

The command would just do the trick! Nice, I can continue using my GnuCash without having to restart and switch OS!