r语言 - 无法创建总线连接;正在运行的命令'timedatectl'的状态为 1



我正在使用WSL2。在R中,我尝试安装软件包。例如:

> install.packages("tidyverse")

但是我得到了一个Failed to create bus connection错误。

追溯:

Failed to create bus connection: No such file or directory
Warning in system("timedatectl", intern = TRUE) :
running command 'timedatectl' had status 1
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Failed to create bus connection: No such file or directory
Warning in system("timedatectl", intern = TRUE) :
running command 'timedatectl' had status 1
** testing if installed package can be loaded from final location
Failed to create bus connection: No such file or directory
Warning in system("timedatectl", intern = TRUE) :
running command 'timedatectl' had status 1
** testing if installed package keeps a record of temporary installation path
* DONE (tidyverse)
The downloaded source packages are in
‘/tmp/RtmpD1g9KP/downloaded_packages’

我已经尝试安装dbus包:

sudo apt-get update
sudo apt-get install dbus

重新启动后,我仍然会收到错误。

我也试过:

sudo systemctl status

但它返回:

System has not been booted with systemd as init system (PID 1). Can't operate.

在.bashrc或其他别名文件中,为TZ添加一个变量

export TZ="America/New_York"

然后重新加载bash,它应该可以识别时区。您可以在此处查看有关时区名称的更多信息:https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

相关内容

  • 没有找到相关文章

最新更新