分类: LINUX
2012-05-09 10:27:20
tar -zxvf scrot-0.8.tar.gz
cd scrot-0.8
./configure --prefix=/soft/scrot
有如下错误:
checking for giblib - version >= 1.2.3... no
*** The giblib-config script installed by giblib could not be found
*** If giblib was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GIBLIB_CONFIG environment variable to the
*** full path to giblib-config.
configure: error: Cannot find giblib: Is giblib-config in the path?
根据提示错误,装giblib:
tar -zvxf giblib-1.2.4.tar.gz
cd giblib-1.2.4
./configure --prefix=/soft/scrot
有如下错误:checking for imlib2 - version >= 1.0.0... no
*** The imlib2-config script installed by imlib2 could not be found
*** If imlib2 was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the IMLIB2_CONFIG environment variable to the
*** full path to imlib2-config.
configure: error: Cannot find imlib2: Is imlib2-config in the path?
根据提示错误,装imlib2:
tar zxvf imlib2-1.4.2.tar.gz
cd imlib2-1.4.2
./configure --prefix=/soft/scrot
make
make install
成功
export PATH=/soft/scrot/bin:$PATH
cd ..
cd giblib-1.2.4
./configure --prefix=/soft/scrot
make & make install
cd scrot-0.8
./configure --prefix=/soft/scrot
make & make install
成功。
但在运行scrot时出错:
cd /soft/scrot/bin
[m@localhost bin]$ ./scrot
./scrot: error while loading shared libraries: libgiblib.so.1: cannot open shared object file: No such file or directory
但是确实有libgiblib.so.1这个文件,用find命令查到在/soft/scrot/lib下
用如下命令:
echo "/soft/scrot/lib" >> /etc/ld.so.conf
ldconfig(更新ld.so.cache)
也可以这样:
[m@localhost server]$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
我就找到了ld.so.conf.d文件夹下面,参考其中的一个文件,写了个
scrot.conf,内容如下:
/soft/scrot/lib
ldconfig
这就可以运行scrot这个不错的截图工具了!
有关参数:
高级使用
对于普通的抓取使用 scrot 的基础便足以应付了。但在某些特殊情况之下,使用 scrot 抓取图像需要讲究一些技巧。