Ohh! That’s not good! So make won’t work after using PIO either? Unless you use sudo too. That cannot be right, it installs it’s toolchain in the users home folder, not in the root filesystem, it shouldn’t then expect you to use sudo. Did you install with sudo or not?
[edit] Do you have a .platformio
folder in your users home directory? Is there one at the root users home directory too?
[edit2] If you have more than one .platformio folder, can you tell which is being used? latest file times or rename one of them to see it is causes an issue.
[edit3] If you look at Glyns first post in this thread he doesn’t use sudo either (and his middle name is platformio), but I suppose he may be a root level user.
[edit4] In the PlatformIO: Compile & upload firmware. Blog post 1/3 thread, there is a variety of sudo and non-sudo commands but no explanation as to which or why. I think some clarification may be in order here.