1. The cause of the error
Generally, it is because /tmp, which stores temporary files, is full.
2. How to solve
(1) You can find the temporary folder first, and then delete some temporary files
(2) Create a folder for storing temporary files
- Only valid for the current terminal
$ mkdir -p $HOME/tmp
$ export TMPDIR=$HOME/tmp
- Permanent
$ mkdir -p $HOME/tmp
$ echo "export TMPDIR=$HOME/tmp" >> ~/.bashrc
$ source ~/.bashrc