Discussion:
texhash not updating ls-R-TEXLIVEDIST
(too old to reply)
g***@garymlewis.com
2017-12-08 13:58:52 UTC
Permalink
Raw Message
Hi -

This problem started with a "ebgaramond.sty not found" error when
running a tex file in TexMaker.

Summary:
ebgaramond.sty does not appear in ls-R-TEXLIVEDIST. Running sudo texhash
does not add the sty file.

Brief synopsis (reboots not identified):
1. Reinstalled OS (Ubuntu 16.04 LTS)
2. Reinstalled complete texlive (as sudo).
3. Reinstalled TexMaker (as sudo).
4. Added /usr/local/texlive/2017/bin/x86_64-linux to $PATH in .bashrc.
5. Ran sudo texhash.
6. Ran myfile.tex in TexMaker. Same error: ebgaramond.sty not found.
7. grep -i "ebgaramond.sty" ls-R-TEXLIVEDIST returns nothing.
8. But, running pdflatex myfile.tex from the command line works fine
(sty file is found).

Is this a known bug? If not, what other information can I provide now?

Thanks.

Gary Lewis
David Carlisle
2017-12-08 18:17:10 UTC
Permalink
Raw Message
Hi -
This problem started with a "ebgaramond.sty not found" error when running a
tex file in TexMaker.
ebgaramond.sty does not appear in ls-R-TEXLIVEDIST. Running sudo texhash
does not add the sty file.
1. Reinstalled OS (Ubuntu 16.04 LTS)
2. Reinstalled complete texlive (as sudo).
3. Reinstalled TexMaker (as sudo).
4. Added /usr/local/texlive/2017/bin/x86_64-linux to $PATH in .bashrc.
5. Ran sudo texhash.
6. Ran myfile.tex in TexMaker. Same error: ebgaramond.sty not found.
7. grep -i "ebgaramond.sty" ls-R-TEXLIVEDIST returns nothing.
8. But, running pdflatex myfile.tex from the command line works fine (sty
file is found).
Is this a known bug? If not, what other information can I provide now?
Thanks.
Gary Lewis
I would guess that your editor is using the system tex that came with
ubuntu not finding the one you just installed. either because it is
using some explicit path like /usr/bin/pdflatex or because it is using
a different PATH

David
George N. White III
2017-12-08 19:12:59 UTC
Permalink
Raw Message
Post by g***@garymlewis.com
Post by g***@garymlewis.com
Hi -
This problem started with a "ebgaramond.sty not found" error when
running a
Post by g***@garymlewis.com
tex file in TexMaker.
ebgaramond.sty does not appear in ls-R-TEXLIVEDIST. Running sudo texhash
does not add the sty file.
1. Reinstalled OS (Ubuntu 16.04 LTS)
This is very rarely useful and doesn't give you an opportunity to find a
solution to
the original issue.
Post by g***@garymlewis.com
Post by g***@garymlewis.com
2. Reinstalled complete texlive (as sudo).
A better approach is to pick a texlive administrator (e.g., the regular
user of a
single-user systems), use "sudo" to create /usr/local/texlive and transfer
ownership to the texlive administrator. Now that it is installed, a
"chown -R ..."
can fix things.
Post by g***@garymlewis.com
Post by g***@garymlewis.com
3. Reinstalled TexMaker (as sudo).
Did you use a package from the temaker site or somethings else?
Post by g***@garymlewis.com
4. Added /usr/local/texlive/2017/bin/x86_64-linux to $PATH in .bashrc.
Post by g***@garymlewis.com
5. Ran sudo texhash.
6. Ran myfile.tex in TexMaker. Same error: ebgaramond.sty not found.
Have you tried running texmaker from the command line where pdflatex
works? A GUI program started from a menu may not get the same PATH as
a shell program.
Post by g***@garymlewis.com
7. grep -i "ebgaramond.sty" ls-R-TEXLIVEDIST returns nothing.
Post by g***@garymlewis.com
8. But, running pdflatex myfile.tex from the command line works fine (sty
file is found).
Is this a known bug? If not, what other information can I provide now?
Thanks.
Gary Lewis
I would guess that your editor is using the system tex that came with
ubuntu not finding the one you just installed. either because it is
using some explicit path like /usr/bin/pdflatex or because it is using
a different PATH
David
I agree with David. You might get better advice from the TexMaker
site.
--
George N. White III <***@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia
Zdenek Wagner
2017-12-08 19:42:22 UTC
Permalink
Raw Message
Hi all,

similar thing happened to me when I installed TeX Live as root, then added
texmf-local and placed some files there and created ls-R files as a normal
user, then updated TeX Live as root and then installed a few new files into
texmf-local as a normal user. During update even the ls-R files in
texmf-local were regenerated and now owned by root, therefore when
installing later files into texmf-local the ls-R could not be updated by a
normal user. So the problem is certainly in the ownership of the ls-R files.

And as George wrote, if you run a command in terminal, the setting of the
whole environment (including PATH) is taken from ~/.bashrc but if you write
it from a menu of a program started by GUI, the environment is taken from
~/.bash_profile, so you must ensure that both load the same settings. If
you change ~/.bashrc, it is sufficient to open a new terminal, if you
change ~/.bash_profile, you must log off and on. These are not bugs but
documented behaviour, see your Linux manual.


Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz
Post by George N. White III
Post by g***@garymlewis.com
Post by g***@garymlewis.com
Hi -
This problem started with a "ebgaramond.sty not found" error when
running a
Post by g***@garymlewis.com
tex file in TexMaker.
ebgaramond.sty does not appear in ls-R-TEXLIVEDIST. Running sudo texhash
does not add the sty file.
1. Reinstalled OS (Ubuntu 16.04 LTS)
This is very rarely useful and doesn't give you an opportunity to find a
solution to
the original issue.
Post by g***@garymlewis.com
Post by g***@garymlewis.com
2. Reinstalled complete texlive (as sudo).
A better approach is to pick a texlive administrator (e.g., the regular
user of a
single-user systems), use "sudo" to create /usr/local/texlive and transfer
ownership to the texlive administrator. Now that it is installed, a
"chown -R ..."
can fix things.
Post by g***@garymlewis.com
Post by g***@garymlewis.com
3. Reinstalled TexMaker (as sudo).
Did you use a package from the temaker site or somethings else?
Post by g***@garymlewis.com
4. Added /usr/local/texlive/2017/bin/x86_64-linux to $PATH in .bashrc.
Post by g***@garymlewis.com
5. Ran sudo texhash.
6. Ran myfile.tex in TexMaker. Same error: ebgaramond.sty not found.
Have you tried running texmaker from the command line where pdflatex
works? A GUI program started from a menu may not get the same PATH as
a shell program.
Post by g***@garymlewis.com
7. grep -i "ebgaramond.sty" ls-R-TEXLIVEDIST returns nothing.
Post by g***@garymlewis.com
8. But, running pdflatex myfile.tex from the command line works fine
(sty
Post by g***@garymlewis.com
file is found).
Is this a known bug? If not, what other information can I provide now?
Thanks.
Gary Lewis
I would guess that your editor is using the system tex that came with
ubuntu not finding the one you just installed. either because it is
using some explicit path like /usr/bin/pdflatex or because it is using
a different PATH
David
I agree with David. You might get better advice from the TexMaker
site.
--
Head of St. Margarets Bay, Nova Scotia
Reinhard Kotucha
2017-12-08 21:45:35 UTC
Permalink
Raw Message
Post by g***@garymlewis.com
This problem started with a "ebgaramond.sty not found" error when
running a tex file in TexMaker.
ebgaramond.sty does not appear in ls-R-TEXLIVEDIST. Running sudo texhash
does not add the sty file.
Hi Gary,
TeX Live neither provides, maintains, nor evaluates a file called
"ls-R-TEXLIVEDIST".

TeX Live provides and maintains ".../texlive/2017/texmf-dist/ls-R".
This one of the ls-R files updated by texhash.

I don't know where "ls-R-TEXLIVEDIST" comes from. It's definitely not
maintained by TeX Live (texhash/mktexlsr). Thus you can safely remove
this file.

I recommend that you check the configuration of TeXMaker. There is
absolutely no reason to configure anything as far as the directory
containing the binaries is in $PATH
(/usr/local/texlive/2017/bin/x86_64-linux in your case).

If TeXMaker needs to locate any files by itself, it should simply use
kpathsea/kpsewhich:

$ kpsewhich ebgaramond.sty
/usr/local/texlive/2017/texmf-dist/tex/latex/ebgaramond/ebgaramond.sty

George White recommeded to change ownership of the /usr/local/texlive
directory tree. This is definitely a good idea and I'm glad that
he mentioned it. Let me elaborate on it.

It's a common misconception to believe that everything is secure only
because it's installed with root permissions. The exact opposite is
the case.

Use sudo only in order to maintain your operating system, never
install software by yourself as a privileged user.

Instead, run

sudo chown -R gary:users /usr/local

and /usr/local is yours.

Whenever you invoke a command with sudo, a small typo can break the
whole system. Use sudo with care and avoid it whenever possible.
Always maintain your own stuff as a non-privileged user.

Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------
Zdenek Wagner
2017-12-08 22:20:55 UTC
Permalink
Raw Message
Post by Reinhard Kotucha
...
Whenever you invoke a command with sudo, a small typo can break the
whole system. Use sudo with care and avoid it whenever possible.
Always maintain your own stuff as a non-privileged user.
IMHO the whole concept of sudo is wrong and I never use it. It allows
unprivileged user to do privileged things. If you have your own personal
computer and do not share it with anybody, then it makes no sense not to
know the root password. You can then do "su -" and enter the root password
and you know that your actions are potentially dangerous. If the computer
is shared by several people then it is stupid to give them the right to use
sudo. A privileged administrator should take care of the system setup,
security etc, other user should not have right to access system settings.
Thus sudo with unlimited rights is wrong.
Post by Reinhard Kotucha
Regards,
Reinhard
Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz
Post by Reinhard Kotucha
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
------------------------------------------------------------------
Reinhard Kotucha
2017-12-09 23:55:17 UTC
Permalink
Raw Message
Post by Reinhard Kotucha
...
Whenever you invoke a command with sudo, a small typo can break
the whole system. Use sudo with care and avoid it whenever
possible. Always maintain your own stuff as a non-privileged
user.
IMHO the whole concept of sudo is wrong and I never use it. It
allows unprivileged user to do privileged things. If you have your
own personal computer and do not share it with anybody, then it
makes no sense not to know the root password. You can then do "su
-" and enter the root password and you know that your actions are
potentially dangerous. If the computer is shared by several people
then it is stupid to give them the right to use sudo. A privileged
administrator should take care of the system setup, security etc,
other user should not have right to access system settings. Thus
sudo with unlimited rights is wrong.
I'm not using sudo either, but I assume that the idea is to prevent
unexperienced users from being logged in as root permanently. This is
a good idea, IMO.

I also use su(1) in order to maintain my system but I configured PS1
in /etc/bashrc so that I'm warned
Norbert Preining
2017-12-10 13:02:49 UTC
Permalink
Raw Message
Hi,

everything has been said, but once again:
* you have two TeX Live installations, one in /usr/local/texlive and one
in /usr/bin, the former one installed by yourself, the later one
is the one shipped by Debian/Ubuntu.

* ls-R-TEXLIVEDIST is the one from Debian/Ubuntu, not the one in
/usr/local/texlive/...

* Your problem with TeX Maker is that you start it from the GUI
(Desktop) and the PATH for the Desktop is not adapted to include
/usr/local/texlive/2017/bin/x86_64-linux, thus it does not use
the correct files.

Possible solutions (one of them):
* set up the PATH in /etc/profile.d/.... to include the correct one
echo "PATH=/usr/local/texlive/2017/bin/x86_64-linux:$PATH" >> /etc/profile.d/texlive-path.sh
echo "export PATH" >> /etc/profile.d/texlive-path.sh

* use the *same* directory for TEXMFLOCAL for both the Debian/Ubuntu TeX
Live and the upstream by doing:
echo "TEXMFLOCAL = /usr/local/share/texmf" >> /usr/local/texlive/2017/texmf.cnf
NOTE that the directory
/usr/local/texlive/texmf-local
will NOT be searched anymore.

Hope that helps.

Norbert

--
PREINING Norbert http://www.preining.info
Accelia Inc. + JAIST + TeX Live + Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Loading...