2014年12月29日 星期一

Ubuntu 12.04 安裝 graphviz 遇到 confclit

在 Ubuntu 12.04 裝 graphviz 遇到 liggd2-xpm 和 libgd2-noxpm 衝突的問題:

$ sudo aptitude install graphviz
The following NEW packages will be installed:
  fonts-liberation{a} graphviz libcdt4{a} libcgraph5{a} libgd2-noxpm{ab} libgraph4{a} libgvc5{a} libgvpr1{a} libpathplan4{a} ttf-liberation{a}
0 packages upgraded, 10 newly installed, 0 to remove and 427 not upgraded.
Need to get 2,716 kB of archives. After unpacking 6,188 kB will be used.
The following packages have unmet dependencies:
 libgd2-xpm:i386 : Conflicts: libgd2 which is a virtual package.
                   Conflicts: libgd2-noxpm but 2.0.36~rc1~dfsg-6ubuntu2 is to be installed.
 libgd2-noxpm : Conflicts: libgd2:i386 which is a virtual package.
                Conflicts: libgd2-xpm:i386 but 2.0.36~rc1~dfsg-6ubuntu2 is installed.
Internal error: the solver Install(fontconfig-config:amd64 2.8.0-3ubuntu9  {fontconfig-config:amd64 2.8.0-3ubuntu9}>) of a supposedly unresolved dependency is already installed in step 125

$ dpkg -l  | grep libgd2
ii  libgd2-xpm:i386                      2.0.36~rc1~dfsg-6ubuntu2            GD Graphics Library version 2

用 apt-cache depends graphviz 了解 graphviz 用到的套件 (可參考這篇說明輸出的內容):

$ apt-cache depends graphviz
graphviz
  Depends: libc6
  Depends: libcdt4
  Depends: libcgraph5
  Depends: libexpat1
 |Depends: libgd2-noxpm
  Depends: libgd2-xpm
  Depends: libgraph4
  Depends: libgvc5
  Depends: libgvpr1
  Depends: libx11-6
  Depends: libxaw7
  Depends: libxmu6
  Depends: libxt6
  Suggests: gsfonts
  Suggests: graphviz-doc
  Recommends: ttf-liberation
    fonts-liberation
  Conflicts: 
  Conflicts: 
  Conflicts: graphviz:i386

我想說既然 conflict 的原因是 libgd2-xpm 和 libgd2-noxmp, 試看看一起指定要裝的東西,不要讓 aptitude 自己選,結果就 OK 了:

$ sudo aptitude install graphviz libexpat1 libgd2-xpm
The following NEW packages will be installed:
  fonts-liberation{a} graphviz libcdt4{a} libcgraph5{a} libgd2-xpm libgraph4{a} libgvc5{a} libgvpr1{a} libpathplan4{a} ttf-liberation{a}
0 packages upgraded, 10 newly installed, 0 to remove and 427 not upgraded.
Need to get 2,719 kB of archives. After unpacking 6,197 kB will be used.
Do you want to continue? [Y/n/?] Y
...

沒有留言:

張貼留言

在 Fedora 下裝 id-utils

Fedora 似乎因為執行檔撞名,而沒有提供 id-utils 的套件 ,但這是使用 gj 的必要套件,只好自己編。從官網抓好 tarball ,解開來編譯 (./configure && make)就是了。 但編譯後會遇到錯誤: ./stdio.h:10...