I use the FreePascalCompiler (FPC) version 3.0.4 on command line level under Kubuntu 20.04.2 LTS and ended up corrupting it myself. Now I find no way to do a clean reinstall of FPC. I suppose the problem is Ubuntu-specific, that's why I put my question here.
This what I have done: I wanted to use in a tiny program of mine a special function that is only available when the unit LConvEncoding is included. The compiler threw up the fatal error message: Unit not found. A lengthy search in different forums brought me two insights:
- This unit should be present, when FPC 3.0.4 is installed correctly.
- I should check the symbolic links that start FPC, because with Ubuntu paths are different.
which fpc
delivers this output: /usr/bin/fpc
. This is a symbolic link to /etc/alternatives/fpc
, again a symbolic link to /usr/bin/x86_64-linux-gnu-fpc-3.0.4
. This is an executable trying to run /usr/lib/x86_64-linux-gnu/fpc/3.0.4/ppcx64
. ppcx64
is the actual compiler for my Mac-64bit-system.
So /usr/lib/x86_64-linux-gnu/fpc/3.0.4/units/
was the directory where to search for the desired unit. Unit LConvEncoding
was unfortunately not present. This made me think that my FPC installation was incomplete. Therefore I uninstalled it with sudo apt-get purge fpc
. And then reinstalled it. This changed literally nothing at all.
Now, to make sure that the directory /usr/lib/x86_64-linux-gnu/fpc/3.0.4/
is really rewritten, I manually deleted /usr/lib/x86_64-linux-gnu/fpc
. No good idea as I know by now. The following installation process went through without error messages, but did not rewrite the directory - it is still missing. So I no longer have an existing Pascal compiler. Every call of the compiler now produces this error message: Error: ppcx64 can't be executed, error message: Failed to execute "ppcx64", error code: 127
.
My guess is that the specific deb package for FPC 3.0.4 under Ubuntu 20.04 contains a buggy un-installer, which doesn't clean up all relevant files. And that's why the installer aborts the installation without an error message, as it encounters already existing files of the desired program version and therefore assumes that the job is already done.
If this assumption is no nonsense, the question is: Which files do I have to delete in order to make sudo apt-get install fpc
to do the full job again?
Or did I get the whole thing wrong?
Hardware: Mac Mini (6.2 dating from 2012 with 4 × Intel Core i5-2415M [email protected])
System: Kubuntu 20.04.2 LTS only. No other operating system installed.