OnSwipe redirect code

Tuesday, March 5, 2013

Package installation error on Ubuntu because of MTS MBlaze package installed

A couple of weeks ago I was trying to get the MTS MBlaze data card to work with my Ubuntu machine (A VM actually). I was happy to see that the MTS guys had provided a .deb package to be used with their data card. Installing that .deb package installed something under the name of "crossplatformui" (very misleading btw). There was probably some problem during the installation, some error thrown, but I am unable to recall that now. Despite several attempts I was not able to use the data card and I finally gave up.

However, that was not the problem. It was what followed afterwards. Ever since that attempt, during every Ubuntu software update process I would encounter an error and would be presented with a huge error log. Every time this was the error :

make -C /lib/modules/3.2.0-38-generic/build M=/usr/local/bin/ztemtApp/zteusbserial/below2.6.27 modules

make[1]: Entering directory `/usr/src/linux-headers-3.2.0-38-generic'

  CC [M]  /usr/local/bin/ztemtApp/zteusbserial/below2.6.27/usb-serial.o

/usr/local/bin/ztemtApp/zteusbserial/below2.6.27/usb-serial.c:34:28: fatal error: linux/smp_lock.h: No such file or directory

compilation terminated.

make[2]: *** [/usr/local/bin/ztemtApp/zteusbserial/below2.6.27/usb-serial.o] Error 1

make[1]: *** [_module_/usr/local/bin/ztemtApp/zteusbserial/below2.6.27] Error 2

make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-38-generic'

make: *** [modules] Error 2

dpkg: error processing crossplatformui (--configure):

 subprocess installed post-installation script returned error exit status 2

This happened during literally every update. My guess is that the "crossplatformui" package never got fully installed and was in a "to be installed" zombie state because of the error in compilation and the post-installation script. That way the package manager would try to install this and run its post-install script on every software update/installation and end up reporting a package installation error.

Looking at the compile commands it was clear from the "zte" string that this was related to the internet data card software. However there was no package with that name and as I said earlier the package name "crossplatformui" is very misleading! After a little bit of looking around I found out that the "crossplatformui" package is indeed the MTS MBlaze software which is causing this problem.

Immediate first instinct was to remove the package. But alas, their post-uninstall (post-remove) script also was buggy and resulted in an error. Repeated attempts to remove it or even "Completely Remove" it failed and the package just stayed there. Finally I inspected those post-install and post-uninstall scripts. Those are present at :


The "postrm" script was trying to kill a process, but that was failing. So I commented it out and tried to kill the process myself, but there was no such process. The next failure was because of a "-d" option being passed to the "rm" command. I could not find any documentation for such an option. So I just removed it. Finally at the end of the script I put a "exit 0" because the package manager was complaining that the post-uninstall script exited with a exit value of 1.

And boy finally it was uninstalled. However these scripts still lingered around. I once again had to go to the Synaptic Package Manager and mark it for "Complete Removal" and purge it away.

Now it appears that I have gotten rid of this package and all its files. Sadly there were no updates available to check if the error had gone away, but I am thinking (and hoping) it has. Will wait for the next update to find out.

Here is the update "postrm" script : https://gist.github.com/brahmana/5087790 . If you are seeing the same package installation error, replacing the "postrm" with this script should do the trick. The changes are on line no : 12,14 and 44