小编Cam*_*ros的帖子

apt-get 等待锁释放

如果你apt-get在终端上运行命令并想在软件中心安装东西,中心说它会等到apt-get完成。我想知道是否可以在终端上做同样的事情,即apt-get在终端上等待直到锁定被释放。

我找到了这个链接aptdcon用于安装东西。我想知道是否:

  • 难道真的不能用apt-get吗?
  • aptdcon兼容的apt-get,也就是说,我可以同时使用安装的东西,而borking系统?

apt lock

9
推荐指数
2
解决办法
5619
查看次数

Arch 中的服务未在 PC 启动时启动

我正在运行 Arch Linux。我有/etc/systemd/system/以下描述的服务

[Unit]
After=network.target

[Service]
Type=simple
ExecStart=(...)service.py
ExecReload=(...)service.py
Restart=always
Run Code Online (Sandbox Code Playgroud)

我将它设置为在网络建立后启动,因为它取决于网络连接。

当我启动 PC 时,该服务始终处于非活动状态。如果我手动启动它运行完美。如果出现一些内部错误,它也会重新启动。为什么开机不启动?

编辑

启用该服务时,我收到此消息:

?  ~ systemctl enable py_service.service                                                                                                                     
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ …
Run Code Online (Sandbox Code Playgroud)

startup arch-linux systemd

9
推荐指数
1
解决办法
2万
查看次数

标签 统计

apt ×1

arch-linux ×1

lock ×1

startup ×1

systemd ×1