[texworks] xubuntu

Lars Madsen daleif at imf.au.dk
Mon Jul 30 12:50:58 CEST 2012


Lars Madsen wrote, On 2012-07-30 12:47:
> Jean-Claude Raoult wrote, On 2012-07-30 12:32:
>> Le 23/07/2012 12:42, Stefan Löffler a écrit :
>>> [...]
>>> A few things come to my mind:
>>>
>>> 1) Permissions
>>> TeX uses "ls-R" files to find things. They are normally generated 
>>> automatically using the "mktexlsr" tool. However, if you installed 
>>> using sudo but are running the rest as a normal user, these files may 
>>> not be updated properly (resulting in TeX not finding files even 
>>> though they are installed). Try running `mktexlsr` from a terminal. 
>>> If it fails with "permission denied" errors, you have several options:
>>> a) run it with `sudo mktexlsr` (not sure if this works; won't make 
>>> your life easier, though, as you'd need to do it manually every time 
>>> you change the packages)
>>> b) change permissions on /usr/local/texlive (or at least some 
>>> files/subdirectories) so that every user can write to them and then 
>>> rerun mktexlsr
>>> c) make yourself the owner of /usr/local/texlive (I used this method 
>>> for convenience, but obviously this is not recommended if several 
>>> users should use/administer the TeX distro); then rerun mktexlsr
>>>
>>> In the end, /usr/local/texlive/2012/texmf-var/ls-R should contain 
>>> "xetex.fmt".
>>
>> I tried methods (b) and (c) which are not contradictory, then,
>>>
>>> 2) Programs
>>> Try running `which mktexlsr` (or similar) to determine if the right 
>>> mktexlsr program is used (i.e., not one still lying around from 
>>> earlier attempts, e.g., using synaptic)
>>
>> Answer to `which mktexlsr' is
>> /usr/bin/mktexlsr
>> Now I was suspicious and used `find' and found
>> /usr/bin/mktexlsr, and
>> /usr/local/texlive/2012/bin/i386-linux/mktexlsr
>>
>> I ran both (there may be some bug, there), and checked: 
>> /usr/local/texlive/2012/texmf-var/ls-R does contain xetex.fmt under 
>> ./web2c/xetex:
>>
>>> 3) Try running `mktexfmt xetex.fmt` from the terminal. It might give 
>>> more verbose output.
>>
>> I did it from a terminal, and it gave no output at all, which was all 
>> I hoped.
>> Then from the terminal, I typed:
>> xetex test
>> (my single line test file) and got the answer:
>> This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
>>
>> kpathsea: Running mktexfmt xetex.fmt
>> I can't find the format file `xetex.fmt'!
>>
>> ??? Before rerunning mktexlsr, but after running mktexfmt, I had tried 
>> xetex test, and got:
>>
>> This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
>> ---! xetex.fmt doesn't match xetex.pool
>> (Fatal format file error; I'm stymied)
>>
>> I looked here and there for a file named xetex.pool and could not find 
>> it...
>> All this is very strange.
>> There may be two instances of texlive, say one in /usr/local and the 
>> other in /usr/share
>> but I am not sure whether it is safe to remove every file whose name 
>> is reminiscent of TeX in /usr/share...
>>
>>
>>
>>                 Jean-Claude Raoult
>>
> 
> just make sure /usr/local/texlive/2012/bin/i386-linux/
> 
> comes first in your path
> 
> If you do
> 
> echo $PATH
> 
> is /usr/local/texlive/2012/bin/i386-linux listed in it?
> 
> if not, then even removing TL 2009 will not help.
> 
> I assume Xubuntu does something similar to Ubuntu, in that case
> 
> cd /etc
> sudo cp environment environment.bak
> 
> (just in case)
> 
> under sudo open the environment file (I don't know the default editor in 
>  Xubuntu, I usually use nano for this)
> 
> In the environment file you will find something similar to
> 
> PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" 
> 
> 
> add the texlive dir at the FRONT, i.e. in my case that would be
> 
> PATH="/usr/local/texlive/2012/bin/i386-linux:/usr/local/sbin:/usr/local/bin:/usr/s 
> 
>  bin:/usr/bin:/sbin:/bin:/usr/games"
> 

and it should of course be one long line


> be very sure to remember the separating colon!
> 
> Then log out, log in again and check via
> 
> which latex
> 
> it should now point towards the new TL one.
> 
> 
> 
> 
> 
> 
> 


-- 

/daleif


More information about the texworks mailing list