How to install LaTeX for Leap 15.1

Hello,

I would like to install Latexlive and LatexStudio on my Laptop. I am running a Leap 15.1 OS.
I wanted to do it the quick way:

zypper install texlive-latex

, but after some while I get the error:

“Installation of texlive-12many-doc-2017.133.0.0.3svn15878-lp151.6.1.noarch failed:
Error: Subprocess failed. Error: RPM failed: error: db4 error(-30986) from dbcursor->c_get: DB_PAGE_NOTFOUND: Requested page not found
error: error(-30986) getting “Productivity/Publishing/TeX/Base” records from Group index: DB_PAGE_NOTFOUND: Requested page not found
error: texlive-12many-doc-2017.133.0.0.3svn15878-lp151.6.1.noarch: install failed”

So I followed the instruction on this site: https://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-860009.2I downloaded install-tl-unx.tar.gz and installed perl.
Then I ran perl install-tl and got the following error, after entering I (I stands for install on hard disc):

“Installing to: /usr/local/texlive/2019
install-tl: mkdir(/usr/local/texlive/) failed for tree /usr/local/texlive/2019: Permission denied at tlpkg/TeXLive/TLUtils.pm line 913, <STDIN> line 1.”

What else can I do?

And why do I find easy 1 click installations for tumbleweed but nothing for Leap 15.1?

When you help me, try to guide me through it as easy as possible as I am not familiar with working on terminal etc.
All I want is to work as soon as possible with TeXStudio.

Best Jens

When you installed using openSUSE packages,
It’s not optimal for a documentation package to fail, but it shouldn’t break your TexLive install… Apps should work without a problem.
If you do this, submit a bug to https://bugzilla.opensuse.org with your error.

As for your attempt to install using;outside sources,
Your error describes the file and line number in that file which failed.
You can take a look at that line and try to resolve the problem or post that line (and maybe a line or two before and after which sometimes is relevant) for others to opine.

TSU

Hi
It could also be hitting an out of date/slow mirror, you can see what it’s doing by adding some verbosity to the install…

I would suggest forcing a refresh of your cache as well…


zypper -vvv ref -f
zypper -vvv in texlive-latex

In this case,
According to software.openUSE.org/search,
There just isn’t a package with that version available for 15.1

TSU

Hi
The search pages is always out of date (but I see it there on my search?), first place to check is the repository, then details, it does exist.

http://download.opensuse.org/distribution/leap/15.1/repo/oss/noarch/texlive-12many-doc-2017.133.0.0.3svn15878-lp151.6.1.noarch.rpm.mirrorlist

Hence hitting a funky/out of date mirror, adding verbosity will show which mirror your hitting, if it’s not in that details list, then change to a different mirror…

Unfortunately, it did not change the situation.

In cache texlive-chemstyle-2017.133.2.0msvn31096-lp151.6.1.noarch.rpm
                                                  (1399/1401),  29.8 KiB ( 36.0 KiB unpacked)
In cache texlive-collection-mathscience-2017.135.svn44396-lp151.7.1.noarch.rpm
                                                  (1400/1401),  19.2 KiB (    0   B unpacked)
In cache texlive-scheme-medium-2017.135.svn44177-lp151.7.1.noarch.rpm
                                                  (1401/1401),  16.0 KiB (    0   B unpacked)
Checking for file conflicts: ..........................................................[done]
(   1/1401) Installing: texlive-SIstyle-doc-2017.133.2.3asvn15878-lp151.6.1.noarch ...[error]
Installation of texlive-SIstyle-doc-2017.133.2.3asvn15878-lp151.6.1.noarch failed:
Error: Subprocess failed. Error: RPM failed: error: db4 error(-30986) from dbcursor->c_get: DB_PAGE_NOTFOUND: Requested page not found
error: error(-30986) getting "Productivity/Publishing/TeX/Base" records from Group index: DB_PAGE_NOTFOUND: Requested page not found
error: texlive-SIstyle-doc-2017.133.2.3asvn15878-lp151.6.1.noarch: install failed

Abort, retry, ignore? [a/r/i] (a): a

That, looks ominously like a corrupted RPM database.

Take a look at the “DB corruption recovery process” here: Howto recover from a RPM database corruption (removing stale locks, etc) · GitHub

By far the easiest way to install LaTeX is to install LyX because you get enough to get you started in most areas. I find Kile provides a satisfactory LaTeX editor if you prefer to work directly with LaTeX.

I don’t know what he is doing there.

I tried to follow but only got this:

(base) main@linux-7qur:~> cd /var/lib/rpm

(base) main@linux-7qur:/var/lib/rpm> /usr/lib/rpm/rpmdb_stat -CA
rpmdb_stat: DB_ENV->open: No such file or directory

(base) main@linux-7qur:/var/lib/rpm> ls
Basenames     Filetriggername  Obsoletename   Requirename  Supplementname
Conflictname  Group            Packages       Sha1header   Transfiletriggername
Dirnames      Installtid       Providename    Sigmd5       Triggername
Enhancename   Name             Recommendname  Suggestname

(base) main@linux-7qur:/var/lib/rpm> cd

(base) main@linux-7qur:~> /usr/lib/rpm/rpmdb_stat -CA
rpmdb_stat: DB_ENV->open: No such file or directory

(base) main@linux-7qur:~> lsof | grep /var/lib/rpm
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing
      Output information may be incomplete.

(base) main@linux-7qur:~> cd /var/lib

(base) main@linux-7qur:/var/lib> tar zcvf /var/preserve/rpmdb-04072019.tar.gz rpm
tar (child): /var/preserve/rpmdb-04072019.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
rpm
tar: Child returned status 2
tar: Error is not recoverable: exiting now

(base) main@linux-7qur:/var/lib> tar zcvf /var/preserve/rpmdb-`04072019`.tar.gz rpm
04072019: command not found
tar (child): /var/preserve/rpmdb-.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
rpm
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Installation for this worked. Working with it is ok. But not optimal.
For example I cannot compile my old tex files with kile where I built in a shell escape. At least I couldn’t figure it out for now.

Working as root, note the “#”

You need root privileges…

su -

The prompt then changes thus:

paul@Orion-8:~$ su -
Password:
Orion-8:~ #

Some of what you are seeing there is normal…

Orion-8:~ # cd /var/lib/rpm
Orion-8:/var/lib/rpm # /usr/lib/rpm/rpmdb_stat -CA
rpmdb_stat: DB_ENV->open: No such file or directory

There are no stale locks…

Try commencing at: “Now verify the integrity of the Packages file:” (Your RPM database is highly likely corrupted anyway, so there is little point in backing it up).

rion-8:/var/lib # cd /var/lib/rpm
Orion-8:/var/lib/rpm # /usr/lib/rpm/rpmdb_verify Packages
Orion-8:/var/lib/rpm #

Verified OK - On my system…

When you have completed all you need as root

exit

Those instructions incidentally are from rpm.org - RPM Database Recovery

Ok. I don’t know what happened, but everything works now.
@tannington the commands verified ok on my system as well. I also went further to the additional sanity check and I never got an error.
Then I rebuilt the indexes.

Did this change anything? Or was it because I installed Lyx? Because after all this I got:

(base) main@linux-7qur:~> sudo zypper install texlive-latex
[sudo] password for root: 
Retrieving repository 'perl-modules' metadata ............................[done]
Building repository 'perl-modules' cache .................................[done]
Loading repository data...
Reading installed packages...
'texlive-latex' is already installed.
No update candidate for 'texlive-latex-2017.133.20170101_pl1svn43813-lp151.6.1.noarch'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.

Then I installed LaTeX Studio and everything works fine.

Thanks for your help.

I’m quite certain from the RPM error you were getting the (RPM) database was in some way corrupted - rebuilding the index fixed it.

Kile (https://kile.sourceforge.io/) has a forum http://sourceforge.net/forum/forum.php?forum_id=292014