Я устанавливаю mysql в WSL: Ubuntu 18.04
когда я перезапускаю mysql sudo service mysql restart
показывает ошибку:
No directory, logging in with HOME=/
mkdir: cannot create directory ‘//.cache’: Permission denied
-su: 20: /etc/profile.d/wsl-integration.sh: cannot create //.cache/wslu/integration: Directory nonexistent
, затем попробуйте изменить файл /etc/profile.d/wsl-integration.sh
# Check if we have HOME folder
if [[ "${HOME}" == "/" ]]; then
exit 0
fi
, но он не работает .... и показать ошибку:
No directory, logging in with HOME=/
-su: 2: /etc/profile.d/wsl-integration.sh: [[: not found
mkdir: cannot create directory ‘//.cache’: Permission denied
-su: 23: /etc/profile.d/wsl-integration.sh: cannot create //.cache/wslu/integration: Directory nonexistent
Как исправить эту проблему? спасибо ....
Может быть, вы можете найти файл .cache/wslu/integration
в /home/
. Там вы можете изменить файл /etc/profile.d/wsl-integration.sh
следующим образом:
HOME=/home/your_name
и убрать проверку ${HOME}