Ano*_*non 5 linux ubuntu r windows-subsystem-for-linux
我正在使用 WSL2。\n在 R 中,我尝试安装软件包。例如:
\n> install.packages("tidyverse")\n但我收到Failed to create bus connection错误。
追溯:
\nFailed to create bus connection: No such file or directory\nWarning in system("timedatectl", intern = TRUE) :\n  running command 'timedatectl' had status 1\n** help\n*** installing help indices\n*** copying figures\n** building package indices\n** installing vignettes\n** testing if installed package can be loaded from temporary location\nFailed to create bus connection: No such file or directory\nWarning in system("timedatectl", intern = TRUE) :\n  running command 'timedatectl' had status 1\n** testing if installed package can be loaded from final location\nFailed to create bus connection: No such file or directory\nWarning in system("timedatectl", intern = TRUE) :\n  running command 'timedatectl' had status 1\n** testing if installed package keeps a record of temporary installation path\n* DONE (tidyverse)\n\nThe downloaded source packages are in\n        \xe2\x80\x98/tmp/RtmpD1g9KP/downloaded_packages\xe2\x80\x99\n我尝试安装 dbus 软件包:
\nsudo apt-get update\nsudo apt-get install dbus\n并且重启后仍然出现错误。
\n我也尝试过:
\nsudo systemctl status\n但它返回:
\nSystem has not been booted with systemd as init system (PID 1). Can't operate.\n小智 2
在 .bashrc 或其他别名文件中,添加 TZ 变量。对我来说,我做到了
export TZ="America/New_York"
然后重新加载 bash,它应该能够识别时区。您可以在此处查看有关时区名称的更多信息:https ://en.wikipedia.org/wiki/List_of_tz_database_time_zones