There are many questions with a similar title, but none of the answers seems to solve my problem. I get this error while preparing slides with beamer. It shows up only when using an up-to-date texlive distribution. When using packages from Ubuntu, it does not. By deleting lines, I saw that it looks like it is beamer that turns the error message on. The following code:

  \setbeamertemplate{navigation symbols}{}

provokes the message:


! Package hyperref Error: Wrong DVI mode driver option `ps2pdf',
(hyperref)                because pdfTeX or LuaTeX is running in PDF mode.

See the hyperref package documentation for explanation.
Type  H <return>  for immediate help.

l.24 }


How can I get rid of that error? Using the driverfallback option as commented out or putting it as an option hyperref={driverfallback=dvipdfm} to class beamer does not help, nor does putting pdftex as an option to just about anything. I have absolutely no need to use listings-ext that contains hyperref.cfg file that sets that ugly ps2pdf option; it seems that beamer in the current texlive distribution loads it all by itself.

| improve this question | | | | |
  • How are you compiling? I tried with pdflatex from texlive2016 and it works fine. – samcarter_is_at_topanswers.xyz Feb 20 '17 at 16:14
  • 1
    Why does your texsystem load a hyperref.cfg from the doc-folder? That's certainly wrong. Did you change something in the configuration? – Ulrike Fischer Feb 20 '17 at 16:18
  • I installed texlive using install-tl-unx.tar.gz and running the installer. To compile the file, I just give the command pdflatex mowa, where mowa.tex is the name of the file to compile. My relevant shell variables are PATH="/usr/local/texlive/2016/bin/x86_64-linux:/home/jandac/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" and TEXINPUTS="/usr/local/texlive/2016/texmf-dist//:/home/jandac/texmf//:.". I changed nothing in the configuration. – jandac Feb 21 '17 at 8:37

I have changed TEXINPUTS so that the initial part is no longer /usr/local/texlive/2016/texmf-dist// but it became /usr/local/texlive/2016/texmf-dist/tex//, and the example compiles, as well as the slides.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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