Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have installed Texlive 2010 on Ubuntu 10.10 from .iso image. now I want to upgrade my pgf. After following these steps, I receive this error:

! I can't find file `pgfmathfunctions.code.tex'.
l.16 \input pgfmathfunctions.code.tex
(Press Enter to retry, or Control-D to exit)

I searched that file and found it in pgf's directories. When I copy it beside of my tex file, another error is occurred: the program is unable to find another file; that exists in pgf directories...

Note: I do sudo texhash after replacing new directories.

share|improve this question
    
It seems that tex is not able to find your files. Where exactly are your pgf directories? Which exact instructions did you follow? The question you linked to has two answers, one of them is Windows (actually, MikTeX) specific, the other one in my opinion lacks many details, and, again in my opinion, mistakenly advises to install new version in the regular texmf tree rather than a local texmf tree. –  Jan Hlavacek Nov 20 '10 at 17:29
    
there are in /usr/local/texlive/2010/texmf-dist/tex/generic/pgf, /usr/local/texlive/2010/texmf-dist/tex/latex/pgf, and etc. so where should I copy new files? –  sorush-r Nov 20 '10 at 17:38
    
... and what is local texmftree? –  sorush-r Nov 20 '10 at 17:39
    
I a typical TeX distribution, all tex and realted (e.g. metafont, I believe that's where the mf comes from) files are kept in several directory trees. There is the main texmf tree (on linux /usr/share/texmf) which contains all the tex files that were installed by your package manager (that would be apt-get or synaptic on ubuntu, texlive's own package manager on some other systems). You should not change anything there manually, since all your changes are going to be overwritten next time the file you change gets automatically updated. –  Jan Hlavacek Nov 20 '10 at 18:28
    
Continuing previous comment: all user installed file should go either into the local texmf tree (on ubuntu it will be /usr/local/share/texmf) or your personal tree (~/texmf). –  Jan Hlavacek Nov 20 '10 at 18:33
show 5 more comments

1 Answer

up vote 3 down vote accepted

Not a direct answer to your question, but the current archive of TeX Live 2010 actually contains pgf/tikz v2.10. So

 sudo tlmgr update --all

will (amongst others) download tikz v.2.10 and install it.

EDIT: I think I know what is going on: You have both TeX Live 2009 from the Ubuntu archive and TeX Live 2010 installed. For your normal user $PATH is set such that TL2010 is seen, but for root path doesn't point to the TL2010 installation. So whenever you call sudo texhash it will actually use the TL2009 texhash, which of course causes problems.

share|improve this answer
    
I don't have a working tlmgr :-( –  sorush-r Nov 20 '10 at 18:49
    
What happens when you try to run tlmgr? That may be related to your texhash problem. –  Jan Hlavacek Nov 20 '10 at 19:10
    
sudo tlmgr update --all gives sudo: tlmgr: command not found but bash knows tlmgr without sudo before it, but it doesn't work (tlmgr update --all gives tlmgr: package repository /media/Documents/Programs/TeX/tex/texlive2010-20100826 You don't have permission to change the installation in any way, specifically, the directory /usr/local/texlive/2010/tlpkg/ is not writable. Please run this program as administrator, or contact your local admin.). –  sorush-r Nov 20 '10 at 19:14
    
try sudo /usr/local/texlive/2010/bin/i386-linux/tlmgr update --all or sudo /usr/local/texlive/2010/bin/x86_64-linux/tlmgr update --self (depending on which architecture you have installed. –  Caramdir Nov 20 '10 at 19:20
    
It's now updating.... –  sorush-r Nov 20 '10 at 19:25
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.