OK, so I suppose you have guessed that you should not run Lazarus as root ?
The issue is that as Lazarus runs it creates lots of files in various places. You do that as root and those files are owned but root, cannot be overwritten as yourself.
This is a particular problem when running a repo install of Lazarus. While you could fix the problem by looking for and removing certain files, I'd suggest it will be easier in the long run to start again. Otherwise, every time something goes wrong, you will suspect owner ship issues.
So, first, remove all of your existing Lazarus install (leave FPC where it is, its fine for now). Use app to do a complete uninstall but that may have issues about the files it installed having been changed. So, let it do what it can then manually remove the remainder. Thats the only hard part. Then, important, remove the files that Lazarus may have made in your home directory, probably in ~/.lazarus. them, check to see if a similar dir existing in /root
Not sure how old your LUbuntu is, but I suggest rather than the repo one, please use a current copy, either 3.8 or 4.0rc2, download the source, build. Its dead easy, lazarus routinely rebuilds itself when you add packages for example.
Basicly, download and unzip a file, cd into the dir, "make clean bigide". I suggest you download a zip rather than using git unless you are a git user already.
See
https://wiki.freepascal.org/Installing_Lazarus_on_Linux#Build_Lazarus_from_SourceHaving lazarus downloaded and built (don't bother to install) in your home directory avoids a whole lot of ownership issues.
Davo
EDIT : if you are feeling really brave, you could try this script to install. If it works, its easy, it will download Lazarus, unzip, build, install a desktop file and icon (so menus work). But no guarantee.
https://github.com/davidbannon/FPC_Laz_Install/blob/main/make-lazarus.bashMind you, installing is easy anyway, the hard part is removing all remnants of your first Lazarus. Note the Lazarus developers have absolutely no say in how Ubuntu packages it.
Good Luck.