Hi,
Never run Lazarus as root user.
Can you run the Lazarus IDE?
If yes:
have a look at Project->Options->Paths
also in Tools->Options->Environment->Files
Check if you have access to "Directory for building test projects"
Before compiling your project
Save the Project and Unit to a folder that you have access as user
B->