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 have recently migrated from Windows to Ubuntu.

My current locale shows below output:

    cha@COMPUTER:~$ locale
    LANG=en_IN
    LANGUAGE=en_IN:en
    LC_CTYPE="en_IN"
    LC_NUMERIC="en_IN"
    LC_TIME="en_IN"
    LC_COLLATE="en_IN"
    LC_MONETARY="en_IN"
    LC_MESSAGES="en_IN"
    LC_PAPER="en_IN"
    LC_NAME="en_IN"
    LC_ADDRESS="en_IN"
    LC_TELEPHONE="en_IN"
    LC_MEASUREMENT="en_IN"
    LC_IDENTIFICATION="en_IN"
    LC_ALL=

When I am trying to install CHMSee (or any other Application) using Software Center, I am getting below error.

    installArchives() failed: perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_IN.ISO8859-1"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_IN.ISO8859-1"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_IN.ISO8859-1"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_IN.ISO8859-1"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    Selecting previously unselected package libchm1.
    (Reading database ... 
    (Reading database ... 5%
    (Reading database ... 10%
    (Reading database ... 15%
    (Reading database ... 20%
    (Reading database ... 25%
    (Reading database ... 30%
    (Reading database ... 35%
    (Reading database ... 40%
    (Reading database ... 45%
    (Reading database ... 50%
    (Reading database ... 55%
    (Reading database ... 60%
    (Reading database ... 65%
    (Reading database ... 70%
    (Reading database ... 75%
    (Reading database ... 80%
    (Reading database ... 85%
    (Reading database ... 90%
    (Reading database ... 95%
    (Reading database ... 100%
    (Reading database ... 207053 files and directories currently installed.)
    Unpacking libchm1 (from .../libchm1_2%3a0.40a-1_i386.deb) ...
    Selecting previously unselected package libjavascriptcoregtk-1.0-0.
    Unpacking libjavascriptcoregtk-1.0-0 (from .../libjavascriptcoregtk-1.0-0_1.8.0-0ubuntu2_i386.deb) ...
    Selecting previously unselected package libwebkitgtk-1.0-common.
    Unpacking libwebkitgtk-1.0-common (from .../libwebkitgtk-1.0-common_1.8.0-0ubuntu2_all.deb) ...
    Selecting previously unselected package libwebkitgtk-1.0-0.
    Unpacking libwebkitgtk-1.0-0 (from .../libwebkitgtk-1.0-0_1.8.0-0ubuntu2_i386.deb) ...
    Selecting previously unselected package chmsee.
    Unpacking chmsee (from .../chmsee_1.3.0-2ubuntu2_i386.deb) ...
    Processing triggers for bamfdaemon ...
    Rebuilding /usr/share/applications/bamf.index...
    Processing triggers for desktop-file-utils ...
    Processing triggers for gnome-menus ...
    Processing triggers for hicolor-icon-theme ...
    Processing triggers for man-db ...
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    Setting up qmail (1.06-4) ...

    The hostname -f command returned: $1

    Your system needs to have a fully qualified domain name (fqdn) in
    order to install the var-qmail packages.

    Installation aborted.

    dpkg: error processing qmail (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of qmail-run:
     qmail-run depends on qmail (>= 1.06-2.1); however:
      Package qmail is not configured yet.
    dpkg: error processing qmail-run (--configure):
     dependency problems - leaving unconfigured
    Setting up libchm1 (2:0.40a-1) ...
    No apport report written because the error message indicates its a followup error from a previous failure.
    Setting up libjavascriptcoregtk-1.0-0 (1.8.0-0ubuntu2) ...
    Setting up libwebkitgtk-1.0-common (1.8.0-0ubuntu2) ...
    Setting up libwebkitgtk-1.0-0 (1.8.0-0ubuntu2) ...
    Setting up chmsee (1.3.0-2ubuntu2) ...
    Processing triggers for libc-bin ...
    ldconfig deferred processing now taking place
    Errors were encountered while processing:
     qmail
     qmail-run
    Error in function: 
    SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)
    Setting up qmail (1.06-4) ...

    The hostname -f command returned: $1

    Your system needs to have a fully qualified domain name (fqdn) in
    order to install the var-qmail packages.

    Installation aborted.

    dpkg: error processing qmail (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of qmail-run:
     qmail-run depends on qmail (>= 1.06-2.1); however:
      Package qmail is not configured yet.
    dpkg: error processing qmail-run (--configure):
     dependency problems - leaving unconfigured

Can someone please help me in resolving this issue? The elaboration would be most appreciated since I am very new to this.

share|improve this question
    
Does hostname -f return $1? Seems like an odd thing to return but that might be your problem. –  Oli Sep 1 '12 at 9:11
    
no it doesn't.'cha@COMPUTER:~$ hostname -f COMPUTER' –  Anshuman Chakraborty Sep 1 '12 at 12:09
    
Guys Please help. I am totally stuck at this point. –  Anshuman Chakraborty Sep 10 '12 at 3:45
add comment

2 Answers

Edit /etc/hosts file to change

127.0.0.1 localhost
127.0.1.1 desktop

to

127.0.0.1 localhost
127.0.1.1 desktop.your.domain desktop

Example: with my machine

127.0.0.1 localhost
127.0.1.1 vnpt

to

127.0.0.1 localhost
127.0.1.1 vnpt.vnpt-domain vnpt

After that you can install qmail.

share|improve this answer
add comment

There could be several problems here, but the main thing is probably the locale settings which I mention in my third point:

1) You could first try to remove the program (qmail) that seems to be causing the problems (and preventing you installing anything else) by running:

sudo apt-get remove qmail

Or if you want to keep it and try to configure it (and anything else), run

sudo dpkg --configure -a

We cannot use dpkg-reconfigure until the package is actually configured in the first place.

Now please try to run sudo apt-get update.

2) Even though your error messages include something about your hostname, this is probably a red herring, as you have discussed in the comments. Nevertheless, you could still check that the output of cat /etc/hostname and the hostname at the top of /etc/hosts are the same.

3) Now, your main problem is probably to do with your locale settings, even though the output of locale doesn't look particularly amiss. However, the exact errors generated by your problem have occurred several times on Ubuntuforums. The general advice is to run locale-gen and feed it with your particular settings; for example, in your case you could run:

sudo locale-gen en.IN 

You might also need to add en_IN.ISO8859-1 or en_IN.UTF-8, depending on how you want your encoding settings specified. The advice in the article here is quite useful and could be further modified to suit your needs if necessary. After running locale-gen, it is also useful to run

sudo dpkg-reconfigure locales

If that does not solve the issue, there is further documentation on locales at the Ubuntu wiki. However, the solution should be to do with locales as it appears to be a common problem.

share|improve this answer
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.