On Linux system, when installing SPARK,
input in the command line window: sudo vi ~/etc/profile
input:
#SPARK_HOME
SPARK_HOME=/home/luoji/JAVA/spark-2.3.1-bin-hadoop2.7
PATH= SPARKHOME / bin: SPARK_HOME /bin:SPARKHOME/bin:PATH
Then press ESC and enter: wq!
Error E212: Can't open file for writing to
check all the materials, and found that the permissions are incorrect. The creator of the profile is local, so the permissions need to be changed.
Command line input: sudo chown user name: group name file name For
example: sudo chown luoji profile
and then find the file like windows operating system,
right click, click properties, and give permissions.
Then you can edit it with the textb editor.
After that, add it in and save.