Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install from dpkg breaks apt on debian 11 (bullseye) #5167

Closed
5 tasks done
helmingstay opened this issue Apr 12, 2023 · 2 comments
Closed
5 tasks done

Install from dpkg breaks apt on debian 11 (bullseye) #5167

helmingstay opened this issue Apr 12, 2023 · 2 comments
Assignees
Labels
bug Something isn't working installers issues with packages from package managers, installers, etc.
Milestone

Comments

@helmingstay
Copy link

Bug description

I recently installed quarto (using the most recent official deb) from commandline on debian 11 using dpkg -i <downloaded deb>.
I just discovered that apt on this system was stuck with the following error, rendering my system un-upgradable.

$ sudo apt <upgrade|install>
 The package quarto needs to be reinstalled, but I can't find an archive for it. 

I was then unable to remove or upgrade quarto using standard dpkg arguments. E.g., :

$ sudo dpkg --purge --force-all quarto
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
(Reading database ... 267028 files and directories currently installed.)
Removing quarto (1.3.296) ...
Purging configuration files for quarto (1.3.296) ...
rm: cannot remove '/usr/local/bin/quarto': No such file or directory
dpkg: error processing package quarto (--purge):
 installed quarto package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 quarto

After manually creating /usr/local/bin and touching '/usr/local/bin/quarto', I was able to upgrade quarto via dpkg, and everything worked as expected.

I suggest modifying the debian install scripts to check for the presence of `/usr/local/bin'. I'm running a unmodified (if old) debian system, and installing quarto caused a significant system outage on my system apparently due to lack of this directory.

Output from quarto check

$quarto check

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.319
      Path: /opt/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.2
      Path: /usr/bin/python3
      Jupyter: 4.7.1
      Kernels: python3

(-) Checking Jupyter engine render....Traceback (most recent call last):
  File "/opt/quarto/share/jupyter/jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "/opt/quarto/share/jupyter/notebook.py", line 18, in <module>
    from nbclient import NotebookClient
ModuleNotFoundError: No module named 'nbclient'
[✓] Checking Jupyter engine render....OK

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
  • Please provide the output of quarto check so we know which version of quarto and its dependencies you're running.
@helmingstay helmingstay added the bug Something isn't working label Apr 12, 2023
@cderv cderv added the triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. label Apr 12, 2023
@cscheid cscheid added the installers issues with packages from package managers, installers, etc. label Apr 12, 2023
@dragonstyle dragonstyle added this to the v1.4 milestone Apr 13, 2023
@mwouts
Copy link

mwouts commented Apr 14, 2023

Hey, I just had the same issue. Installing the deb package (for the first time maybe?) on an Ubuntu machine did not work:

$ sudo dpkg -i /home/marc/Downloads/quarto-1.3.324-linux-amd64.deb 
(...)
rm: cannot remove '/usr/local/bin/quarto': No such file or directory
dpkg: warning: old quarto package post-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
rm: cannot remove '/usr/local/bin/quarto': No such file or directory
dpkg: error processing archive /home/marc/Downloads/quarto-1.3.324-linux-amd64.deb (--install):
 new quarto package post-removal script subprocess returned error exit status 1
rm: cannot remove '/usr/local/bin/quarto': No such file or directory
dpkg: error while cleaning up:
 new quarto package post-removal script subprocess returned error exit status 1

The workaround was:

$ sudo mkdir /usr/local/bin
$ sudo touch /usr/local/bin/quarto

and then I could successfully do

$ sudo dpkg -i /home/marc/Downloads/quarto-1.3.324-linux-amd64.deb 
(Reading database ... 378516 files and directories currently installed.)
Preparing to unpack .../quarto-1.3.324-linux-amd64.deb ...
Unpacking quarto (1.3.324) over (1.3.324) ...
Setting up quarto (1.3.324) ...
$ sudo apt-get install -f

@cderv cderv removed the triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. label Apr 14, 2023
@dragonstyle
Copy link
Collaborator

Fixed in cee2d24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working installers issues with packages from package managers, installers, etc.
Projects
None yet
Development

No branches or pull requests

5 participants