安装 CHMSee 时出错

安装 CHMSee 时出错

我最近从 Windows 迁移到了 Ubuntu。

我的当前语言环境显示以下输出:

    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=

当我尝试使用软件中心安装 CHMSee(或任何其他应用程序)时,出现以下错误。

    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

有人能帮我解决这个问题吗?由于我对此很陌生,所以如果能详细说明我将不胜感激。

答案1

这里可能存在几个问题,但主要问题可能是我在第三点中提到的区域设置:

qmail1) 您可以先尝试删除似乎导致问题(并阻止您安装任何其他程序)的程序( ),方法是运行:

sudo apt-get remove qmail

或者如果你想保留它并尝试配置它(和其他任何东西),运行

sudo dpkg --configure -a

dpkg-reconfigure在实际配置该包之前,我们无法使用它。

现在请尝试运行sudo apt-get update

2) 即使您的错误消息包含有关主机名的信息,但这可能是一个转移注意力的借口,正如您在评论中讨论的那样。不过,您仍然可以检查 的输出cat /etc/hostname和 顶部的主机名/etc/hosts是否相同。

3) 现在,您的主要问题可能与您的语言环境设置有关,即使 的输出locale看起来没有什么特别的问题。但是,您的问题产生的确切错误在 Ubuntuforums 上已经发生过几次。一般建议是运行locale-gen它并提供你的特定设置;例如,在你的情况下你可以运行:

sudo locale-gen en.IN 

您可能还需要添加en_IN.ISO8859-1en_IN.UTF-8,具体取决于您希望如何指定编码设置。文章在这里非常有用,如果需要,可以进一步修改以满足您的需求。运行后locale-gen,还可以运行

sudo dpkg-reconfigure locales

如果这不能解决问题,请参阅有关语言环境的更多文档Ubuntu 维基。然而,解决方案应该与语言环境有关,因为这似乎是一个常见问题。

答案2

编辑 /etc/hosts 文件以更改

127.0.0.1 localhost
127.0.1.1 desktop

127.0.0.1 localhost
127.0.1.1 desktop.your.domain desktop

例如:使用我的机器

127.0.0.1 localhost
127.0.1.1 vnpt

127.0.0.1 localhost
127.0.1.1 vnpt.vnpt-domain vnpt

之后您就可以安装 qmail。

相关内容