I've recently been installing citrix receiver on a couple of 64 bit Linux Mint machine at home. Mint is based on Ubuntu so the deb releases of citrix receiver work successfully apart from one side effect, it leaves icaclient in an error state so every time you run apt-get you get an error saying that icaclient isn’t configured properly.

A little bit of googling reveals the fix on Ubuntu’s site, but you need to manually repair the deb file to fix it. This is not as scary a task as it might first sound (its just annoying that you have to do it in the first place) … the Ubuntu site explains it much better than I could, so here it is verbatim:

This is available as a .deb from the Citrix site:

Beware – this should be used with caution as it will install with an error. The postinst script exits 2 as it fails to correctly determine the architecture of the system. The ICAClient package will function, but APT will complain that ICAClient is “not fully installed or removed” and you will get errors each time you use a package manager.

This can be fixed by unpacking the deb and editing the regular expression in line 2648 of the postinst script to match x86_64. Then rebuild the deb and it should install without a problem.

Note that although flagged as a 64-bit package, this will simply pull in the required compatibility libs – it is not a true 64-bit version.

The line in the middle is the important one, you need to edit line 2648 of the postinst script. You can follow the following steps to edit the file (or look up other resources on the internet, there are plenty around). Also note that this isn’t a full step by step, you may want to create temporary directories for the files you are unpacking, but the main steps are listed.

Download the 64 bit deb file and unpack it into a directory using ar

ar x icaclient.deb

untar control.tar.gz into a new directory and edit the postinst file on line 2648 to :

echo $Arch|grep “x86_64″ >/dev/null

tar all the files back up into control.tar.gz (remove the old one) and place the new control tar back with the other files from the unpacked deb.

Rebuild the deb file using ar again :

ar r icaclient_12.1.0_amd64_fix.deb debian-binary control.tar.gz data.tar.gz

Note that the order of parameters to ar is mportant. This will rebuild the deb file, which you can now reinstall. this should finish successfully (and quickly if you have previsoudly installed the citrix receiver) and leave you with a clean setup. You can try sudo apt-get install to test.

It's also worth noting that I did a nasty hack in the regex, so that it will only match x86_64, you may need to be smarter if you were planning to use it on machines with different architectures


Stew

amateur classical guitarist, very amateur photographer, professional geek