101

I recently updated my operating system from Ubuntu 13.04 to Ubuntu 13.10.

Since then, I am facing difficulties compiling my TeX code in which the french babel package is called. Please note that all my sources were compiling very fine before the system upgrade.

However, now, given the following header:

  \usepackage[francais]{babel}

I receive the following error:

! Package babel Error: Unknown option `francais'. Either you misspelled it

What should I do? Please note that if I remove this part of code (\usepackage[francais]{babel}), everything is compiling well. I also tried it with french, and I receive the same result.

Thank you in advance for your help.


MINIMUM WORKING EXAMPLE :

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}
This is a MINIMUM WORKING EXAMPLE.
\end{document}
! Package babel Error: Unknow option `francais'. Either you misspelled it
8
  • It's french not francais Oct 20, 2013 at 13:39
  • 8
    @YuppieNetworking : Unfortunately, it's not working either with french. I receive the same error.
    – Martingal
    Oct 20, 2013 at 13:41
  • 5
    @LudovicC. It worked with francais before the upgrade. And only this line gives this error. If I remove it, there is no further error.
    – Martingal
    Oct 20, 2013 at 13:49
  • 9
    @Alenanno : Yes, I need that package, otherwise I wouldn't be asking here ... Especially when it's french reports.
    – Martingal
    Oct 20, 2013 at 13:54
  • 2
    @LudovicC. For future reference, please do not ask users to "add all your preamble for us to see if there is some problems in it". I refer to the following guide on how to write a minimal working example.
    – Sverre
    Oct 9, 2014 at 13:29

7 Answers 7

104

The complete error message is:

! Package babel Error: Unknown option `francais'. Either you misspelled it
(babel)                or the language definition file francais.ldf was not found.

Package file babel.sty supports francais since a very long time, thus the second line of the error message applies very likely:

The organization of the babel language files has recently changed. The language files (.ldf, ...) go into separate TeX distribution packages. For example, option francais loads frenchb.ldf:

  • TeX Live puts the latter in the distribution package babel-french. It needs to be installed, if you are using tlmgr, the package manager of TeX Live.

  • In Ubuntu saucy there is a package texlive-lang-french that contains frenchb.ldf (file list). Install it, if you are using TeX Live of Ubuntu.

3
  • 3
    Your second proposal solved my problem. Thank you very much for your help. I have no idea why it was removed when upgrading the system. Anyway, thanks again !
    – Martingal
    Oct 20, 2013 at 14:16
  • 2
    FWIW: In Fedora 18+, packages like texlive-babel-german contains the relevant files. Jan 7, 2014 at 15:16
  • 2
    It works in the same way in Ubuntu 16.04 for italian language: just need to install the package texlive-lang-italian.
    – Danibix
    Aug 19, 2017 at 18:54
63

I had the same error while trying to generate the pdf files from lyx. I did run sudo apt-get install texlive-lang-french and the error was resolved. Now working fine

Update: These packages have become obsolete; texlive-lang-european should be installed now:

sudo apt-get install texlive-lang-european

5
  • 10
    Just a note: I encountered this issue with German, but texlive-lang-european did not resolve the issue. Only texlive-lang-german did.
    – crsh
    May 8, 2015 at 8:00
  • 1
    you forgot an install after apt-get
    – pkofod
    May 18, 2015 at 21:49
  • Installing apt-get install texlive-lang-french solved my problem. Jun 19, 2015 at 1:51
  • In the CTAN repo the package name is slightly different, install with tlmgr install collection-langeuropean.
    – PHPirate
    Oct 31, 2017 at 19:46
  • collection-langeuropean contains "minor" languages, and does not include at least: German, Italian, French, Spanish, Polish, Portuguese.
    – mariotomo
    Sep 30, 2018 at 0:19
8

Exactly same issue here for various languages like: \usepackage[dutch]{babel}

A way of solving: Open: Ubuntu Software Center and install: texlive-lang-all

But what still changed is that in case you change the language in the \usepackage[english]{babel} you have to remove the temporary latex files before latex-ing again. But with that remark every works again as before.

1
  • 1
    Installing texlive-lang-all worked for me
    – Jatin
    Nov 11, 2020 at 11:05
2

The solution for the error prompted for \usepackage[spanish]{babel} :

! Package babel Error: Unknown option `spanish'. Either you misspelled it

Install the texlive-babel-spanish package via yum/dnf:

sudo dnf install texlive-babel-spanish
1
  • 2
    This package doesn't exist for Ubuntu with apt-get, as with other languages the command needed is sudo apt-get install texlive-lang-spanish.
    – Diego-MX
    Oct 28, 2016 at 15:09
2

I had the same problem for the Spanish language, only after reading I came to the conclusion that I had to install all the packages, and so I did for Elementary OS from the terminal:

$ sudo apt-get install texlive-full texmaker

Yo tuve el mismo problema para el lenguaje español, unicamente luego de leer llegué a la conclusión que debía instalar todos los paquetes, y así hice para Elementary OS desde la terminal:

$ sudo apt-get install texlive-full texmaker

Screenshot of Texmaker

0

I found this post looking for the spanish version of this error, i.e.:

Package babel Error: Unknown option `spanish'.

To solve do:

sudo apt-get install texlive-lang-spanish

(Works on Ubuntu 16.04 LTS)

0

I was looking for an answer here (duplicate question). For me on different Ubuntu derivates, this did the trick:

sudo apt-get install texlive-lang-german

(don't forget the install as in egreg's comment there, where I have this from)

For Fedora/Debian please use

sudo dnf install texlive-babel-german

Of course, you can replace german with your needed language, dutch, spanish or francais, as in the other answers.

Apparently (as stated in this answer), these packages have become obsolete; texlive-lang-european should be installed now:

sudo apt-get install texlive-lang-european

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .