Identify all the Bitcoin core processes, kill those "gracely" and then follow the steps that other users indicated. Your device can not obtain a lock on the folder because another process is using it.
Simply running
bitcoin-cli stop in a terminal will shut it down. No process identification necessary.