I updated my Ubuntu to the newest version 11.10 recently. Today when I use PGF again, i find many of my old examples cannot compile. It always give the error information as:
! Package PGF Math Error: The function `reciprocal' already exists.
See the PGF Math package documentation for explanation.
Type H <return> for immediate help.
...
l.156 ...@\pgfmath@reciprocaltemp0000000\pgfmath@}
! Package PGF Math Error: The function `div' already exists.
See the PGF Math package documentation for explanation.
Type H <return> for immediate help.
...
l.212 }
! Package PGF Math Error: The function `mod' already exists.
See the PGF Math package documentation for explanation.
Type H <return> for immediate help.
...
l.228 }
Does anyone have the same problem?
EDIT: I have followed the suggestions by many people here that I have installed TeXLive 2011 manually and updated the path, and logout and login again. The sad thing is that the problem still exists. I am wondering whether the problem really comes from the TeXlive 2009? :-(
/usr/local/texlive/isn't a terrible idea. But in order to not confusedpkg, you can't uninstall Ubuntu's TeXlive 2009 (not without a lot of manual intervention at least). When it's installed there, make symlinks (ln -s) to the TeXlive 2011 binaries in /usr/local/bin and you'll be good to go (I think... I haven't done this myself) – kahen Oct 26 '11 at 14:19/usr/local/texlive/2011/⟨OSNAME⟩/binor something like that, where⟨OSNAME⟩is the name of the system (e.g.win32on Windows). So you'd do something like this (as root):cd /usr/local/texlive/2011/⟨OSNAME⟩/bin/; for $BINARY in *; do if [ -x $BINARY ]; then; ln -s $BINARY /usr/local/bin/$BINARY; fi; done. The alternative is to edit /etc/profile to add TeXlive 2011's binary directory to the beginning of your $PATH. – kahen Oct 26 '11 at 14:45/etc/profileis read on login (or when it's manually sourced, of course). Logout and back in again. Also, the line should probably be something like this instead:[ -d /usr/local/texlive/2011/bin/x86_64-linux ] && PATH=/usr/local/texlive/2011/bin/x86_64-linux:${PATH}– kahen Oct 26 '11 at 15:04/usr/local/binas they might be overwritten by an update of the Ubuntu TeX packages. It's better to change.profileor adding a file in/etc/profile.das explained here – egreg Oct 26 '11 at 15:08dpkgdoesn't touch/usr/local.Ubuntu's TeX binaries are in/usr/bin.– kahen Oct 26 '11 at 15:11profile.dway is surely neater and easier. – egreg Oct 26 '11 at 15:19/usr/local, and the binaries will be accessible to everybody, no matter what shell they are using. – Jan Hlavacek Oct 26 '11 at 16:33