Usługa drukowania nie jest dostępna


19

Przepraszam, jeśli to pytanie wygląda znajomo: próbowałem rozwiązań zaproponowanych przez wyszukiwania Google, ale albo nie działają, albo są dla mnie zbyt techniczne.

Pomyślałem z filiżankami kilka dni temu, nie pamiętam dokładnie, jak i dlaczego, ale ostatecznie usunąłem niektóre pliki filiżanek.

Kilka razy odinstalowałem i ponownie zainstalowałem puchary, za pośrednictwem centrum oprogramowania i za pomocą terminala, a także ponownie zainstalowałem puchary-demony, ale nic się nie zmienia.

Teraz moja lokalna drukarka nie będzie działać. Otrzymuję komunikat „usługa drukowania jest niedostępna. Uruchom usługę na tym komputerze lub połącz się z innym serwerem”. Przycisk „uruchom usługę” to „greyd out” wprowadź opis zdjęcia tutaj

Próbowałem ponownie uruchomić usługę za pośrednictwem terminala za pomocą

sudo service cups restart

na które powłoka odpowiada:

cups stop/waiting

i wtedy nic się nie dzieje, tak jakby skorupa „czekała” na coś, co się stanie. Muszę zrobić ctrl-c, aby odzyskać monit.

Po wypróbowaniu instrukcji rozwiązywania problemów w menu pomocy jest napisane, że „Wydaje się, że bufor wydruku CUPS nie działa. Aby to naprawić, wybierz„ System-> Administracja-> Usługi z menu głównego i poszukaj usługi „kubki” „

Nie wiem, gdzie to jest „System-> Administracja-> Usługi” w Ubuntu 14.04 lts

Próbowałem też:

sudo /etc/init.d/cups start

co przyniosło

cupsd: Child exited with status 1

Czy próbowałeś przywrócić pliki usunięte z kosza lub kopii zapasowej?
— Starszy Geek

nie, ale te pliki były w folderze Cups, więc założyłem, że zostały one ponownie zapisane przy ponownej instalacji.
— frepie

To byłoby logiczne pierwsze podejście przed ponowną instalacją, ponieważ wiedziałeś, że je usunąłeś. Czy próbowałeś całkowicie wyczyścić kubki przed ponownym zainstalowaniem?
— Starszy Geek

1
syslog:Jan 17 12:15:33 Inspiron-1501 cupsd: Unable to open "/etc/cups/cupsd.conf": No such file or directory Jan 17 12:15:33 Inspiron-1501 kernel: [80564.409920] init: cups main process (18868) terminated with status 1 Jan 17 12:15:33 Inspiron-1501 kernel: [80564.409977] init: cups main process ended, respawning
— frepie

1
Nie ma /etc/cups/cupsd.conffolderu, mimo że kilka razy instalowałem kubki
— frepie

Odpowiedzi:


18

Miałem podobny problem (lubuntu 16.04) z „niedostępnością usług poligraficznych”. Ten stan uniemożliwił systemowi wyświetlenie lokalnej drukarki USB do wyboru. Zostało to rozwiązane przez zainstalowanie CUPS:

sudo apt-get install cups

Następnie odbij usługę:

sudo /etc/init.d/cups restart

Na koniec uruchom ponownie komputer.

Nie musiałem instalować CUPS na mojej instancji Ubuntu 16.04.


5

Znalazłem rozwiązanie: na forum znalazłem dziewiczą zawartość cupd.conf. Utworzyłem nowy plik cupsd.conf, wykonując:

gksudo gedit /etc/cups/cupsd.conf

i skopiowałem poniższą dziewiczą zawartość cupd.conf

#
#
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

# Deactivate CUPS' internal logrotating, as we provide a better one, especially
# LogLevel debug2 gets usable now
MaxLogSize 0

# Administrator user group...
SystemGroup lpadmin

# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing Off
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
BrowseAddress @LOCAL

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    AuthType Default
    Order deny,allow
  </Limit>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

#
#

Zapisałem go, a następnie ponownie uruchomiłem usługę

sudo service cups restart

i to załatwiło sprawę.


+1 dzięki milion za domyślny cupsd.conf! Zastąpiłem swoją pustą kopię i przywróciłem wszystkie oryginalne ustawienia drukarki. Nie mam pojęcia, w jaki sposób cupd.conf został wyczyszczony! Zastanawiam się, czy to była ostatnia aktualizacja CUPS?
— user31301
Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.