跳转至

'nmet dependencies' Ubuntu 安装错误

在 Ubuntu 操作系统上安装探针是报错如下:

* Installing APT package sources for Cloud Insight

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.0dkKOJrsNY --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 54B043BC
gpg: requesting key 54B043BC from hkp server keyserver.ubuntu.com
gpg: key 54B043BC: "Cloud Insight Packages <package@aiops.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

* Installing the Cloud Insight Agent package

Ign http://apt.aiops.com stable InRelease
Hit http://apt.aiops.com stable Release.gpg
Hit http://apt.aiops.com stable Release
Hit http://apt.aiops.com stable/main amd64 Packages
Hit http://apt.aiops.com stable/main i386 Packages
Ign http://apt.aiops.com stable/main TranslationIndex
Ign http://apt.aiops.com stable/main Translation-en_US
Ign http://apt.aiops.com stable/main Translation-en
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 kunagi : Depends: tomcat6 but it is not going to be installed
          Recommends: msttcorefonts
          Recommends: ttf-dejavu but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
ERROR
Failed to install the Cloud Insight package, sometimes it may be
due to another APT source failing. See the logs above to
determine the cause.
If the cause is unclear, please contact Cloud Insight support.

报错说明:

以上报错说明 Ubuntu 系统内 APT 包源本身冲突,如果不安装更新软件的话这个问题不会表现出来,但在安装 Cloud Insight 探针时第一步执行的 sudo apt-get update,此时系统内如果有服务需要升级版本,就会报出错。

解决方法:

这个问题 Cloud Insight 本身没有问题,所以可以在安装时分布安装,跳过 update 的操作,具体方法如下:

wget http://download.aiops.com/ci_agent/CiAgent_x.x.0-1_amd64.deb  (可以自行查看当前版本)
dpkg -i CiAgent_x.x.0-1_amd64.deb
vi /etc/CiAgent/CiAgent.conf     ( 修改成自己的 license_key )
/etc/init.d/CiAgent restart

以上几步即包括删除不需要的软件包,下载当前最近 Cloud Insight 探针(里面包括探针各种依赖包),修改探针配置文件,添加进自己的 license_key ,重启探针,让配置生效,其他之前的一键复制也是运行的这些功能。


5分钟,开启你的跨云监控之旅 (`⌄´ )