2

td-agent2 显示以下警告:

# sudo /opt/td-agent/embedded/bin/fluent-gem list
WARN: Unresolved specs during Gem::Specification.reset:
      json (>= 1.4.3)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
(snip)

我尝试通过 修复此问题sudo /opt/td-agent/embedded/bin/fluent-gem cleanup,但此命令无法修复警告。

这没有问题吗?

# td-agent --version
td-agent 0.12.7

# apt-cache show td-agent
Package: td-agent
Status: install ok installed
Priority: extra
Section: misc
Installed-Size: 207309
Maintainer: Treasure Data, Inc
Architecture: amd64
Version: 2.2.0-0
Description: Treasure Agent: A data collector for Treasure Data
Description-md5: 9a8c3c5185974525f7e38d7f37f5d597
License: unknown
Vendor: Omnibus <omnibus@getchef.com>
Homepage: http://treasuredata.com

# sudo /opt/td-agent/embedded/bin/fluent-gem --version
WARN: Unresolved specs during Gem::Specification.reset:
      json (>= 1.4.3)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
2.2.1

# Ubuntu 14.04

https://gist.github.com/sanemat/09e5d995d9c607054dad

4

1 回答 1

1

问题

看起来有冲突的gem 版本json

WARN: Unresolved specs during Gem::Specification.reset:
      json (>= 1.4.3)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.

修复Bundler的问题

如果你使用 Bundler,你应该会看到这个问题消失了。

修复gem cleanup( RubyGems )的问题

否则,请尝试gem cleanup(通常无法正常工作):

$ gem cleanup json
Cleaning up installed gems...
Clean Up Complete

修复gem uninstall( RubyGems )的问题

或者尝试卸载一些json不再使用的 gem:

$ gem uninstall json

Select gem to uninstall:
 1. json-1.4.3
 2. json-1.8.2
 3. json-1.8.3
 4. All versions
> 1
Successfully uninstalled json-1.4.3
于 2016-05-05T17:58:11.670 回答