Saturday, January 8, 2011

gnuplot cannot set terminal jpeg, gif, and png

如果無法設定 gnuplot 的 terminal 為 jpeg/gif/png,原因是系統缺少 libgd,可從查看 gnuplot 執行 configure 時的紀錄檔 config.log 得知。

configure:8171: WARNING: libgd not found or too old, version >= 2.0 is required
...
configure:12599: result: jpeg terminal: no (requires libgd with jpeg support)
configure:12612: result: gif terminal: no (requires libgd with gif support)
configure:12621: result: png terminal: no (requires libgd with png support)
configure:12629: result: (jpeg, gif and png terminals cannot use TTF fonts, requires libgd support)


解決方式是安裝 gd-devel 套件。

範例:使用 yum 更新。
1. 查看適合的套件
$ yum search gd-devel
gd-devel.i386 : The development libraries and header files for gd
gd-devel.x86_64 : The development libraries and header files for gd

2. 選擇所需安裝套件
$ yum install gd-devel.x86_64

3. 再重新安裝 gnuplot 即可
$ ./configure; make; make install

1 comment:

  1. 請問輸入yum search gd-devel後,
    顯示Warning: No matches found for: gd-devel
    No Matches found應該如和處理呢?

    ReplyDelete