使用適用於 Linux 的 Windows 子系統在 Ubuntu 上使用 CUPS 和列印

使用適用於 Linux 的 Windows 子系統在 Ubuntu 上使用 CUPS 和列印

我正在建立一個跨平台列印應用程序,需要在各種 Linux 上測試它。我可以使用虛擬機,但我已經讓 WSL 坐在這裡工作,它會方便得多,至少最初只是使用它。

我已經安裝了 CUPS,但它無法運行:

$ dpkg -s cups
Package: cups
Status: install ok installed
...
$ sudo systemctl restart cups.service
System has not been booted with systemd as init system (PID 1). Can't operate.

我在網路上找到了一個關於在 WSL 中列印的指南,它聽起來就像「正常工作」:https://www.scivision.dev/scanningprinting-with-windows-subsystem-for-linux/

我缺什麼?

答案1

使用sudo service cups startsudo /etc/rc.d/init.d/cups start

systemctl正如您的錯誤訊息所示,依賴 systemd

相關內容