update-rc.d: error: XXX Default-Start contains no runlevels, aborting.
时间: 2024-03-27 19:36:24 浏览: 267
这个错误是由于在使用update-rc.d命令时,没有指定要运行服务的默认运行级别。在使用update-rc.d命令时,需要指定运行服务的默认启动级别。例如,如果您要将服务设置为在运行级别3和5启动,则可以使用以下命令:
```
sudo update-rc.d your_service_name defaults 35
```
请将"your_service_name"替换为您要设置的服务的名称。默认启动级别是在"/etc/rc*.d"目录中定义的符号链接的数字部分。
相关问题
update-rc.d
`update-rc.d` is a command used in Debian-based Linux distributions to manage the initialization scripts (or "runlevels") of system services. It allows the administrator to enable or disable services to automatically start during system bootup, as well as specify the order in which they start and stop.
For example, to enable the Apache web server to start automatically at boot time, you could use the following command:
```
sudo update-rc.d apache2 enable
```
Similarly, to disable the service:
```
sudo update-rc.d apache2 disable
```
Note that `update-rc.d` should be used with caution, as changing the startup behavior of services can have unintended consequences. It's always a good idea to make a backup of the configuration files before making any changes.
阅读全文