Score:0

Why do I not have permission to run this mpic command?

kh flag

I'm very bad with the command line and have just downloaded Ubuntu (in the microsoft store) yesterday. I'm trying to compile and run a cpp file with a specific command. I'm logged in as a non-root user and this is the command I want to use to compile the file:

mpic++ circuitSatisfiability.cpp -Wall -ansi -pedantic -std=c++17 -o circuitSatisfiability

But then I get this message:

/usr/bin/ld: cannot open output file circuitSatisfiability: Permission denied
collect2: error: ld returned 1 exit status
mpic++: No such file or directory

If I do "ls" I can see my file is in there. Via the windows file I can also see that there is a ".idea" folder. Others could compile this way, why cant I?

kinggoid games avatar
kh flag
If I write "mpic++" it tells me it doesn't have input files, so I guess it is accessible. Also, it did work if I used sudo. But people tell me I shouldn't use and shouldn't have to use this
waltinator avatar
it flag
You don't have write access to the current directory, that's why `ld` complains `cannot open output file `. Look at `ls -ld $PWD`.
kinggoid games avatar
kh flag
I get this: drwxr-xr-x 3 root root 4096 Mar 21 16:35 /home/teemo/school
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.