I am pretty new to LaTeX. With windows, Miktex/Texmaker pretty-much takes care of package installation whenever needed, but on Ubuntu I have been downloading needed packages from CTAN and installing them manually. So today I installed three packages on my Ubuntu 9.10: xfor, datatool and etoolbox. For some reason I get this weird error on quick build:

(/usr/share/texmf/tex/latex/datatool/datatool-base.sty
Package: datatool-base 2012/07/18 v2.10 (NLCT)
(/usr/share/texmf/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2011/01/03 v2.1 e-TeX tools for LaTeX
\etb@tempcnta=\count97
! LaTeX Error: Command \AtBeginEnvironment already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...


Can anyone help me fix this error ? I am actually writing my thesis using a cls file provided by my university. I am using Texmaker editor.

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  Marco Daniel Aug 4 '12 at 10:46
Why do you use Ubuntu 9.10. It's very old and not longer supported. You can install TeX Live 2012 to avoid the manual installation of packages. –  Marco Daniel Aug 4 '12 at 10:46
Please cut your document down to load the minimum number of packages such that you still get the error and then edit the question to show the complete document so people can reproduce the problem. You are loading two packages that define \AtBeginEnvironment  (etoolbox and something else presumably) but it isn't really possible to help given no information. –  David Carlisle Aug 4 '12 at 11:05
What do you mean, getting this error “on quick build”? Are you getting these while installing packages (in which case previous commenters are barking up the wrong tree), or while compiling your own LaTeX files? In any case, more detail is needed. –  Harald Hanche-Olsen Aug 4 '12 at 11:49

the problem is the etextools package, that contains many names that can easily lead to clashes, like discussed here: Re: The package 'etextools' is not compatible with biblatex