Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been able to successfully build local repository. When I do apt-get against this local repository everything works fine. Sample output-

Hit http://192.168.1.142 precise InRelease
Hit http://192.168.1.142 precise/contrib amd64 Packages
Ign http://192.168.1.142 precise/contrib TranslationIndex
Ign http://192.168.1.142 precise/contrib Translation-en

After checking that everything is working fine, I copied the repository to production server. Now I am getting below error message :

Err http://www.DOMAIN.com precise/contrib Translation-en
  Error reading from server. Remote end closed connection [IP: A.B.C.D 80]

Why apt-get is trying to download translations file from one server (and if it doesn't find it gives error) but not from other?

I've checked HTTP headers and both servers are sending Content-Type: text/html;charset=UTF-8

share|improve this question
    
Which version of Ubuntu you use on the PC trying to fetch translation file? –  Anwar Shah Sep 7 '12 at 9:15
1  
Can you tell us what output does it give with env | grep LC for each machine? You can use paste.ubuntu.com site for the output –  Anwar Shah Sep 7 '12 at 9:59
    
When you said you copied the repository, what files did you copy? (please update the question) did it include the translation files? –  syockit Nov 17 '12 at 7:43
add comment

1 Answer

The Apt configuration variable controlling whether or not to download language files is Acquire::Languages. You can change this variable to prevent Apt not to check for a language file.

To do so:

  1. Open a terminal with Ctrl + Alt + T

  2. Create a file naming 99-mysettings in the directory /etc/apt/apt.conf.d with admin privilege.

    gksu gedit /etc/apt/apt.conf.d/99-mysettings
    
  3. Then write this line below in the file and save it. Close the gedit.

    Acquire::Languages "none";
    

Now, apt-get should not check the language files.

You can do the same thing as a one liner in a terminal like this

echo 'Acquire::Languages "none";' | sudo tee -a /etc/apt/apt.conf.d/99mysettings

Hope this will help. Now try again with sudo apt-get update.

share|improve this answer
    
My question is why apt-get is downloading file from one repository but not from other? I am using same setting while fetching. On one server I see "Ign" on TranslationsIndex and "Err" on other server. Please re-read my question. Thank you. –  Gaurav Kumar Sep 6 '12 at 21:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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