如果已经安装了 ruby​​-json,如何在 12.04 上安装 Vagrant?

如果已经安装了 ruby​​-json,如何在 12.04 上安装 Vagrant?

我尝试安装软件中心中的软件和虚拟盒等新软件,但显示错误:

Items cannot be installed or removed until the package catalog is
repaired, do you want to repair it?

当我单击修复图标时,它显示:

Package operation failed, installation or removal of a software
package failed

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
(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 ... 195378 files and directories currently installed.)
Unpacking ruby-json-pure (from
.../ruby-json-pure_1.5.1-0ubuntu3_all.deb) ... dpkg: error processing
/var/cache/apt/archives/ruby-json-pure_1.5.1-0ubuntu3_all.deb
(--unpack):  trying to overwrite '/usr/lib/ruby/vendor_ruby/json.rb',
which is also in package ruby-json 1.6.3-1 No apport report written
because MaxReports is reached already Errors were encountered while
processing: 
/var/cache/apt/archives/ruby-json-pure_1.5.1-0ubuntu3_all.deb Error in
function:  dpkg: dependency problems prevent configuration of
ruby-vmc:  ruby-vmc depends on ruby-json-pure (>= 1.5.1); however:  
Package ruby-json-pure is not installed. dpkg: error processing
ruby-vmc (--configure):  dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of
cloudfoundry-client:  cloudfoundry-client depends on ruby-vmc (=
0.3.10-0ubuntu10); however:   Package ruby-vmc is not configured yet. dpkg: error processing cloudfoundry-client (--configure):  dependency
problems - leaving unconfigured

如何修复这个问题?

答案1

我认为您想从他们的网站安装最新的 Vagrant .deb。它不再是 Ruby gem。

答案2

这里的问题是 Vagrant 的依赖项之一需要ruby-json-pure安装该包。但是,这与ruby-json已安装的包冲突。您可以尝试删除该包ruby-json,但这可能需要您首先删除安装该包的程序。

我认为这个问题没有简单的解决办法;看起来它已被报告为一个错误,并已在 Quantal 及更高版本中修复: https://bugs.launchpad.net/ubuntu/+source/ruby-vmc/+bug/1045460

相关内容