# pdfpages error: ! Package keyval Error: page undefined

This very simple working example does not work to include pdf and produces the error message "! Package keyval Error: page undefined.":

\documentclass{article}

\usepackage{pdfpages}

\begin{document}

Test

\includepdf[scale=0.7]{./a.pdf}

\end{document}


From log-file:

(/home/wyousef/texmf/tex/latex/Bioinformatics/graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)

(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)

(/usr/share/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
)
\Gin@req@height=\dimen105
\Gin@req@width=\dimen106
)


./tmp.tex:9: Package keyval Error: page undefined.

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

l.9 \includepdf[pages=-]{./a.pdf}

• Show your log-file. Is your system up-to-date? – Ulrike Fischer Aug 14 '17 at 13:33
• I have done archlinux update for everything using sudo packman -Suy – Waleed A. Yousef Aug 14 '17 at 13:34
• This doesn't mean that you have an up-to-date tex. So show the log-file. – Ulrike Fischer Aug 14 '17 at 13:37
• This is not accessible. – Ulrike Fischer Aug 14 '17 at 13:42
• local files wins over default files. Your system is quite up-to-date. – Ulrike Fischer Aug 14 '17 at 14:33

The log file does not match the example above (\includepdf[scale=0.7]{./a.pdf} in the example but \includepdf[pages=-]{./a.pdf} in the log-file)!
Nevertheless, the log-file shows, that you have a very outdated /home/wyousef/texmf/tex/latex/Bioinformatics/graphicx.sty from 1999, that is found before the graphicx.sty of the distribution, because it is in your TEXMFHOME tree which is usually searched before, e.g., the distribution tree TEXMFDIST or TEXMFMAIN, which is /usr/share/texmf-dist/ in your case.
You should remove at least this outdated file /home/wyousef/texmf/tex/latex/Bioinformatics/graphicx.sty so that TeX Live (namely kpsewhich) will find /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty. All other files seem to be up-to-date, so that I'd expect the distribution graphicx.sty also to be up-to-date.
Instead of removing only this old file, you could also suggest to rename /home/wyousef/texmf, e.g., into /home/wyousef/texmf.outdated. In this case kpsewhich and other TeX applications should not longer find files in this TEXMF-tree. If you later find, that you need files from there, you could copy only those files to the correct destination in a new /home/wyousef/texmf.