最近入手了一块Pi想试试看通过它来控制数码相机,直接用ubuntu自带的apt-get可以安装一个旧版本但是太多需要的相机没有被支持.所以决定自己编译安装一个
点击这个链接
首先下载了libgphoto-2.5.23(此时的最新版),然后解压,configure
然后中途自己断了.提示:
configure: error: cannot compile and link against libltdl
libgphoto2 requires libltdl (the libtool dl* library),
嗯…翻车了,缺包是吧?这个应该是比较容易的
sudo apt-get install libltdl-dev
-o Acquire::http::proxy=“http://192.168.0.103:1080/”
然后APT系统一顿神操作之后(忽略后面半段参数就好,本人因为调试程序电脑固定IP与网络冲突,必须设置代理服务器才能出去),这个包就装好了,重新愉快的configure.
一边思考人生一边看着代码在屏幕上飞驰,哎…要是能再快点就好了…可惜比较难.啊…完成了:但是,看到屏幕上的配置结果,我好像有点不开心?
Features
Use translations: yes
JPEG mangling support: yes
libxml-2.0: no
XML support for Olympus E s…: no
gdlib: no
libGD conversion support: no
Camlibs: all
build API docs with gtk-doc: no (not requested)
libexif: no
那几个no是什么意思?强迫症!!!
sudo apt-get install libxml2-dev libgd-dev libexif-dev
好了.继续看刷屏…
好了,继续configure
Features
Use translations: yes
JPEG mangling support: yes
libxml-2.0: yes
XML support for Olympus E s…: yes
gdlib: yes
libGD conversion support: yes
Camlibs: all
build API docs with gtk-doc: no (not requested)
libexif: yes
好了,令人满意的全yes(不要说gtk-doc,手上的这个小板子可是连视频输出口都莫得的,而且未来也不会有GUI),还等啥呢?make起来,发热吧!!!四个核
完成?install.然后等这一波屏刷完/(吐槽:最近为什么老在看刷屏???)
往回翻屏幕内容,看看有没有什么有价值的线索.
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the ‘-LLIBDIR’
flag during linking and do at least one of the following:
add LIBDIR to the ‘LD_LIBRARY_PATH’ environment variable
during execution
add LIBDIR to the ‘LD_RUN_PATH’ environment variable
during linking
use the ‘-Wl,-rpath -Wl,LIBDIR’ linker flag
have your system administrator add LIBDIR to ‘/etc/ld.so.conf’
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
Libraries have been installed in:
/usr/local/lib/libgphoto2/2.5.23
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the ‘-LLIBDIR’
flag during linking and do at least one of the following:
add LIBDIR to the ‘LD_LIBRARY_PATH’ environment variable
during execution
add LIBDIR to the ‘LD_RUN_PATH’ environment variable
during linking
use the ‘-Wl,-rpath -Wl,LIBDIR’ linker flag
have your system administrator add LIBDIR to ‘/etc/ld.so.conf’
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
可能是挺重要的,先记下来吧…没准回头编译gPhoto的时候会用上