首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能创建总线连接;运行命令'timedatectl‘时状态为1

未能创建总线连接;运行命令'timedatectl‘时状态为1
EN

Stack Overflow用户
提问于 2022-04-10 14:23:39
回答 1查看 2.6K关注 0票数 3

我在用WSL2。在R,我试着安装软件包。例如:

代码语言:javascript
复制
> install.packages("tidyverse")

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

回溯:

代码语言:javascript
复制
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包:

代码语言:javascript
复制
sudo apt-get update
sudo apt-get install dbus

并且在重新启动后仍然会收到错误。

我也试过:

代码语言:javascript
复制
sudo systemctl status

但它会返回:

代码语言:javascript
复制
System has not been booted with systemd as init system (PID 1). Can't operate.
EN

回答 1

Stack Overflow用户

发布于 2022-07-08 20:25:15

在.bashrc或其他别名文件中,为TZ添加一个变量。对我来说,我做到了

代码语言:javascript
复制
export TZ="America/New_York"

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71817480

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档