When I run ./hadoop namenode -format command, I get this error:
26/11/18 17:03:56 ERROR namenode.NameNode: java.io.IOException: Cannot create directory /your/path/to/hadoop/tmp/dir/hadoop-hadoop/dfs/name/current
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:295)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1086)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1110)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:856)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:948)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:965)
sudo: no valid sudoers sources found, quitting
How to solve this?