6

I'm trying to do my CV with moderncv but Texmaker show me an error

!LaTeX Error:File 'moderncv.cls' not found. 

But the moderncv macro is installed in TeX Live 2011.

Torbjørn T.
  • 206,688
Vassilis
  • 301
  • 4
    from a terminal, do sudo mktexlsr to update the files database, and then kpsewhich moderncv.cls, just to check that it is correctly installed. – Koji Apr 10 '12 at 08:47
  • 1
    Also, which tex or which kpsewhich to be sure that the correct TeX Live installation is in use, in case you have two (eg, one installed by yourself, and one installed by your linux distro as a dependency to another package). – mpg Apr 10 '12 at 20:35
  • 1
    And for Windows? I use windows 7 and Ubuntu. – Vassilis Apr 11 '12 at 11:45
  • @Vassilis MiKTeX or TeX Live? For TL, you can start a Command Prompt with admin rights and proceed as for Linux (without sudo, of course). For MiKTeX, you are probably better using the graphical tools: update the Filename Data Base from the 'admin' version of the settings manager. – Joseph Wright Apr 15 '12 at 08:00
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – jub0bs Mar 19 '14 at 20:35

2 Answers2

2

On Linux From a Terminal, type sudo mktexlsr to update the files database, and then kpsewhich moderncv.cls, just to check that it is correctly installed.

On Windows For TeX Live, you can start a Command Prompt with admin rights and proceed as for Linux (without sudo, of course). For MiKTeX, you are probably better using the graphical tools: update the Filename Database from the 'admin' version of the settings manager.

Xavier
  • 13,947
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • 1
    when I tried to do from a terminal,mktexlsr to update the files database, and kpsewhich moderncv.cls,I got this error: starting package maintenance... installation directory: C:\Users\lenovo\AppData\Roaming\MiKTeX\2.9 package repository: http://ftp.uniRoma2.it/TeX/systems/win32/miktex/tm/packages/ lightweight database digest: cb165a1c18f8d7e97d99f5d594be9dd3 going to download 890787 bytes going to install 24 file(s) (1 package(s)) downloading http://ftp.uniRoma2.it/TeX/systems/win32/miktex/tm/packages/moderncv.tar.lzma... kpsewhich: Couldn't connect to server what Should I do and thanks – Lina Aug 21 '13 at 22:15
1

I downloaded the moderncv from

https://ctan.org/tex-archive/macros/latex/contrib/moderncv

and copied the folder into

/usr/local/texlive/2016basic/texmf-dist/tex/latex/

Then I ran the following terminal command:

> sudo texhash

to let LaTeX know about the new folder in the file system.

Running my moderncv file again in my favorite LaTeX editor 'texmaker' is showed up properly. :)