0

A partial update (sent by Ubuntu) of Ubuntu 20.04 broke my existing installation of texlive. After unsuccessfull attempts to install various parts of it I used apt to purge and remove it. Now I still can't install texlive or any parts of it. This is the result: (Trying other parts give "similar" results.)

Reading package lists... Done Building dependency tree
Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: texlive : Depends: texlive-latex-base (>= 2019.20200218) but it is not installable texlive-base : Depends: texlive-binaries (>= 2019.20190605) texlive-latex-recommended : Depends: texlive-binaries (>= 2019.20190605) Depends: texlive-latex-base (>= 2019.20200218) but it is not installable E: Unable to correct problems, you have held broken packages.

What are my options? (One might be to go back to Slackware.)

dburke
  • 1
  • A "partial upgrade" is offered when you have thoroughly borked your system with wrong-version or non-Ubuntu packages that conflict with the rest of the system. There is no single magic incantation. The solution is to uninstall ALL packages from wrong-version or non-Ubuntu sources, returning your system to as close to stock condition as possible. Then disable those wrong-version and non-Ubuntu sources. If you have done it properly, then you will be able to complete the upgrade. – user535733 Feb 07 '21 at 22:53
  • If I did bork my system it must have been a week or so earlier when I finally did get xpdf installed. This is not standard with 20.04 but I did use Ubuntu sources to get it done. – dburke Feb 08 '21 at 00:57
  • If you are creating a Frankensystem of Ubuntu packages on top of some other Debian or Debian-derived system, then we cannot help you beyond advising you to not do that. The problems you are encountering are expected behavior if you do that. – user535733 Feb 08 '21 at 01:34

2 Answers2

0

update your question to show output of running

dpkg --get-selections | grep hold

in addition run below

sudo apt-get update

sudo apt-get --fix-broken install -y

sudo apt-get -f install -y

sudo apt-get dist-upgrade

sudo apt-get autoremove

sudo apt-get autoclean -y

and update your question with any interesting output from above

below is how to install the necessaries to be able to edit latex files

sudo apt install  -y texlive-latex-extra  texlive-fonts-extra  texstudio

once that finishes tap your WIN key to bring up the Dash search ... or click on the Show Applications menu then enter ... texstudio

texstudio is the application to edit and convert into pdf any latex file

there is no need to explicitly install texlive-latex-recommended since above install command will auto add that package

If above fails to work run this

sudo apt-get -f install  texlive-latex-extra  texlive-fonts-extra  texlive-binaries texlive-latex-base texlive-base texlive-latex-recommended  

and update your question with its output if it fails

UPDATE ______________________

when you see

The following packages have unmet dependencies: texlive-binaries : Depends: libptexenc1 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed Depends: libkpathsea6 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed Depends: libsynctex2 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed Depends: libtexlua53 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed Depends: libtexluajit2 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed Recommends: dvisvgm but it is not going to be installed E: Unable to correct problems, you have held broken packages.

this means you have installed a newer version of some package than the recommended version so solution typically involves removing that package ... so question is how to find that offending package

update your question ( do NOT put into a comment ) the output of running

dpkg -l | grep 2020.20200327.54578-6

so my guess is remove the package which shows in output of above command

hint: to properly format text you paste into a question put four spaces at front of each line of text

  • The dpkg suggestion did not give any output to the terminal. Apparently grep did not find any instance of "hold" in the output – dburke Feb 07 '21 at 23:59
  • The texstudio suggestion is not relevant. I don't need or want a dedicated TeX editor -- I have a preferred text editor that does everything I want. I want a working TeX system! The other two suggested packages do not install of course. – dburke Feb 08 '21 at 00:28
  • @dburke run above updated set of commands to flush out your issue – Scott Stensland Feb 08 '21 at 00:30
  • I did run the other six commands in that order with no problems. Still -- nothing involving any packages of texlive will run. – dburke Feb 08 '21 at 00:51
  • run this

    sudo apt-get -f install texlive-latex-extra texlive-fonts-extra texlive-binaries texlive-latex-base texlive-base texlive-latex-recommended and update your question with its output if it fails

    – Scott Stensland Feb 08 '21 at 01:44
  • Output in two comments: Reading package lists... Done Building dependency tree
    Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
    – dburke Feb 08 '21 at 04:31
  • The following information may help to resolve the situation:

    The following packages have unmet dependencies: texlive-binaries : Depends: libptexenc1 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed Depends: libkpathsea6 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed Depends: libsynctex2 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed Depends: libtexlua53 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed

    – dburke Feb 08 '21 at 04:32
  • Depends: libtexluajit2 (< 2019.20190605.51237-3build2.1~) but 2020.20200327.54578-6 is to be installed Recommends: dvisvgm but it is not going to be installed E: Unable to correct problems, you have held broken packages. – dburke Feb 08 '21 at 04:33
0

Scott -- Thank you for your help. Apparently Ubuntu wants to install texlive (2019 version) but has already installed the incompatible 2020 versions of the 5 libraries (libptexenc1, libkpathsea6, libsynctex2, libtexlua53, libtexluajit2). A couple of days ago I reinstalled all of these but by default it installed the 2020 versions again. Checking the man page for apt-get I found out how to specify the version 2019.20190605.51237-3build2 for each of these libraries. I should know -- the "man page" can be your friend. Now, texlive has just finished installation and I believe I will be able to add whatever is needed. Thanks again.

dburke
  • 1