# How to update package in a specific directory?

When compiling a latex file using TeXstudio, I encounter the following error message

Package animate Error: Support package 'pdfbase.sty' too old.


C:\Program Files\MiKTeX\tex\latex\animate\animate.sty


Then I use MiKTeX console to update the package using both administrator mode and user mode. In both mode, the 'animate.sty' is not installed in the above folder. In user mode, it's installed in folder

C:\Users\username\AppData\Roaming\MiKTeX\


In administrator mode, it shows the package is installed in

C:\Program Files\MiKTeX


After I update the packages under both modes, the error still exists. How can I update the animate.sty in that directory to solve the issue? Any other methods to solve the issue are also welcomed. Thanks.

Update: Reinstalled the MiKTex. Following the suggestion in the comment and test a simple file

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{media9}
\usepackage{animate}

\begin{document}

Test
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=\textwidth, height=0.4\textheight]{images/test.png}
\end{center}
\end{figure}
this is  another test 222222222222

\end{document}


Still got the same error. The log file is at https://www.dropbox.com/sh/hvzvyoq3qnx1ql3/AABfIk10j1X7WCI8O9Q1hNHya?dl=0

2021-05-02 16:21:15,374+0800 INFO  pdflatex - this process (13424) started by 'texmaker' with command line: pdflatex -synctex=1 -interaction=nonstopmode test.tex
2021-05-02 16:21:15,390+0800 INFO  pdflatex - allowing known shell commands
2021-05-02 16:21:16,812+0800 INFO  pdflatex - this process (13424) finishes with exit code 1


Notice that in the file directory there is a forward slash. Not sure if something is wrong there.

C:\username\AppData\Local\Programs\MiKTex\tex/latex\animate\animate.sty


Also notice 'media9' package doesn't seem to be installed. After install, still have the same error.

• pdfbase.sty is in the media9 package. – Ulrike Fischer Apr 29 at 12:42
• But when I click the the log message, it open the animate.sty file. – Lei Hao Apr 29 at 13:12
• And so what? animate reports an too old pdfbase.sty so you have to update pdfbase.sty and not animate. Check if media9 is up-to-date. – Ulrike Fischer Apr 29 at 13:15
• Good point. I just installed the media9 package. The error still exists. Do you happen to know what causes it? – Lei Hao Apr 29 at 13:25
• you have a local pdfbase.sty in the folder of your document, the log-file shows (pdfbase.sty . Delete it. – Ulrike Fischer May 2 at 8:47