I'm new to Ubuntu, and I'm trying to get my Ubuntu web server running, but I have a problem with composer. When I run composer install it outputs this error [ErrorException] file_put_contents(./composer.lock): Failed to open stream: Permission denied.
I found a solution for this on the internet, but it doesn't work for me
Not working solution:
sudo chown -R $USER ~/.composer/
It outputs
chown: cannot access '/home/admin/.composer/': No such file or directory
I'm using Ubuntu 20.04. Does anyone know what should I do?