gpt4 book ai didi

r - 建立总线连接失败;运行命令 'timedatectl' 的状态为 1

转载 作者:行者123 更新时间:2023-12-05 05:43:29 33 4
gpt4 key购买 nike

我正在使用 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

关于r - 建立总线连接失败;运行命令 'timedatectl' 的状态为 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71817480/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com