5

I tried to update from texlive 2015 to 2017.

I ran the following commands:

sudo add-apt-repository ppa:jonathonf/texlive-2017
sudo apt-get update
sudo apt-get install texlive-full

After running the last line, I get a lot of package names with unmet dependencies and the following error:

 E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

But running sudo apt-get -f install results in another error

Preconfiguring packages ...
(Reading database ... 880678 files and directories currently installed.)
Preparing to unpack .../texlive-fonts-extra-doc_2017.20170619-1~16.04.york0_all.deb ...
Unpacking texlive-fonts-extra-doc (2017.20170619-1~16.04.york0) over (2015.20160320-1) ...
dpkg: error processing archive /var/cache/apt/archives/texlive-fonts-extra-doc_2017.20170619-1~16.04.york0_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/texlive-doc/latex/mweights/README', which is also in package texlive-latex-extra-doc 2015.20160320-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/texlive-fonts-extra-doc_2017.20170619-1~16.04.york0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

It looks like I am stuck with a circular problem.
I tried the solution listed in Install texlive 2017 on Ubuntu 16.04 LTS but was not successful.

Can someone help me out please?

Fabby
  • 34,259

1 Answers1

10

Usually it is not recommeded, but you can force file overwrite with

sudo dpkg -i --force-all /var/cache/apt/archives/texlive-fonts-extra-doc_2017.20170619-1~16.04.york0_all.deb

and then

sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get dist-upgrade
N0rbert
  • 99,918
  • 1
    Thank you very much @N0rbert! I had to use the sudo dpkg -i ... command and sudu apt-get install -f iteratively until all the packages were unpacked and installed. Finally I ran sudo dpkg --configure -a and sudo apt-get dist-upgrade. Now I have texlive 2017 running on Ubuntu 16.04 without a problem. – pendingIntent Mar 29 '18 at 01:08
  • 1
    Great! So you can accept my answer :) – N0rbert Mar 29 '18 at 08:37
  • 1
    Sorry. I'm a newbie to this forum. Looks like I accepted it now. – pendingIntent Mar 29 '18 at 12:46
  • If individual packages gets pesky, maybe try sudo dpkg -i --force-all /var/cache/apt/archives/texlive-* and finally, try this https://askubuntu.com/a/654680/63298 – alvas Dec 25 '19 at 17:06