[SOLVED] Linux: Cannot use autocomplete because of Unit Not Found lazarus / 9-Editor ---------------------------------------------------------------------- CM630 · 2025-05-30 07:42 Lazarus 4 on Linux Mint Mate. In an old project running so far only in Windows I cannot use Autocomplete, and Find declaration of... when using the IDE in Linux. When I try to use autocomplete (etc) I get "Unit xxx not found...". I tried rearranging the units, each time a different unit is blamed. The blamed unit is always one of the Lazarus/FPC units, never a unit which is a part of the project. Actually, it seems that the last Lazarus/FPC unit in the UNIT list is the not-found one. There is another odd thing - I can use autocomplete in the UNUT section, but the names of the units offered are always lowercase (lazutif8, instead of LazUTF8). I have created a new project, in it when I use autocomplete there the names of the units are with the proper case. The project builds and works. Maybe something in the LPI or the LPR files is wrong? ---------------------------------------------------------------------- cdbc · 2025-05-30 08:23 Hi Nope! Your problem lies in 'Access Rights', most Linux/Unix OS' install apps & programs in 'ReadOnly' Root-space, i.e.: Administrator / SuperUser restricted. You can probably read and execute in 'root-space', as a normal user, but not much more. This is safety, for the system and for you. Lazarus tries to circumvent this by creating a 'shadow-path' in your /home/you/.lazarus/ directory, where it (and you) has /write-rights/, in the case of recompiling etc... >> It does not always work as advertized <<  There are 3 possible ways to solve this: - Install FPC & Lazarus from source in your /home/you/ directory - Use 'FpcUpDeluxe' to install both in your /home/you/ directory - In commandprompt --> su to root --> cd into /usr/lib64/ --> chmod 777 -R lazarus ----> in lazarus -> recompile lazarus itself --> chmod 644 -R lazarus (!) DO NOT LEAVE LAZARUS DIR 777 (!) It's unsafe!!! Sometimes I've had luck with creating an 'alias' file for the uses clause, but this approach is more like a 'crap-shoot'  Regards Benny ---------------------------------------------------------------------- Thaddy · 2025-05-30 08:42 Better option: sudo groupadd fpcusers sudo usermod -aG fpcusers $USER sudo chgrp -R fpcusers /usr/lib/fpc /usr/share/lazarus sudo chmod -R g+rw /usr/lib/fpc /usr/share/lazarus Now fpc and lazarus users can access the units without using sudo. The same can be achieved with symlinks, but that is slightly more permissive. This may be debian based distributions specific. I have little knowledge of other distributions, but this should work for debian, ubuntu, mint and the likes. (Put those lines in a shellscript if you want.) ---------------------------------------------------------------------- cdbc · 2025-05-30 08:52 Hi Thanks Thaddy, I don't speak 'debian' ...and for the cli-tips  Regards Benny ---------------------------------------------------------------------- CM630 · 2025-05-30 09:01 Quote from: Thaddy on May 30, 2025, 10:42:07 am... sudo groupadd fpcusers sudo usermod -aG fpcusers $USER sudo chgrp -R fpcusers /usr/lib/fpc /usr/share/lazarus sudo chmod -R g+rw /usr/lib/fpc /usr/share/lazarus ...Thanks, I did it this way. Now Autocomplete, and Find declaration of... work! Thanks!