在Ubuntu上安装pHash时出错 [英] Error installing pHash on Ubuntu

查看:266
本文介绍了在Ubuntu上安装pHash时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图在Ubuntu上安装phash库。我已经安装了运行此命令的所有必需的软件包:

  apt-get install libavformat-dev libmpg123-dev libsamplerate-dev libsndfile -dev cimg-dev libavcodec-dev ffmpeg libswscale-dev 

然后我运行./configure,一切似乎好,我得到了:

  francesco @ francesco-VirtualBox:〜$ cd'/home/francesco/Scrivania/pHash-0.9 .6'
francesco @ francesco-VirtualBox:〜/ Scrivania / pHash-0.9.6 $ ./configure
检查BSD兼容的安装... / usr / bin / install -c
检查构建环境是否正常...是
检查线程安全mkdir -p ... / bin / mkdir -p
检查gawk ... no
检查for mawk ... mawk
检查make集合$(MAKE)... yes
检查g ++ ... g ++
检查C ++编译器是否工作...是
检查C ++编译器默认输出文件名... a.out
检查可执行文件的后缀...
检查是否交叉编译... no
检查对象的后缀files ... o
检查我们是否使用GNU C ++编译器...是
检查g ++是否接受-g ...是
检查包含的样式是否使用make .. 。GNU
检查g ++的依赖风格... gcc3
检查gcc ... gcc
检查我们是否使用GNU C编译器...是
检查gcc接受-g ...是
检查gcc选项以接受ISO C89 ...无需
检查gcc的依赖性样式gcc3
检查/ etc / gentoo-release。 .. no
检查/ etc / redhat-release ... no
检查/ etc / slackware-version ... no
检查/ etc / debian_version ... yes
检查/ etc / SuSErelease ... no
检查构建系统类型... x86_64-unknown-linux-gnu
检查主机系统类型... x86_64-unknown-linux-gnu
检查pthreads库-lpthreads ... no
检查pthreads是否没有任何标志... no
检查pthread是否使用-Kthread ... no
检查是否pthreads使用-kthread ... no
检查pthreads库-llthread ... no
检查pthreads是否与-pthread一起使用是
检查可连接的pthread属性.. 。PTHREAD_CREATE_JOINABLE
检查pthread是否需要更多特殊标志... no
检查如何运行C预处理器... gcc -E
检查处理长行的grep和-e ... / bin / grep
检查egrep ... / bin / grep -E
检查ANSI C头文件...是
检查sys / types.h .. 。是
检查sys / stat.h ...是
检查stdlib.h ...是
检查string.h ...是
检查内存.h ... yes
检查strings.h ... yes
检查inttypes.h ...是
检查stdint.h ...是
检查for unistd.h ... yes
检查ln -s是否正常...是
检查如何打印字符串... printf
检查不会截断输出的sed 。/ bin / sed
检查fgrep ... / bin / grep -F
检查gcc使用的ld ... / usr / bin / ld
检查链接器usr / bin / ld)是GNU ld ... yes
检查BSD或MS兼容的名称列表(nm)... / usr / bin / nm -B
检查名称lister / usr / bin / nm -B)interface ... BSD nm
检查命令行参数的最大长度... 1572864
检查shell是否了解一些XSI结构...是
检查shell是否理解+ =... yes
检查如何将x86_64-unknown-linux-gnu文件名转换为x86_64-unknown-linux-gnu格式... func_convert_file_noop
检查将x86_64-unknown-linux-gnu文件名转换为toolchain格式... func_convert_file_noop
检查/ usr / bin / ld选项重新加载对象文件... -r
检查objdump ... objdump
检查如何识别依赖库... pass_all
检查dlltool ... no
检查如何关联运行时和链接库... printf%s\\\

检查ar ... ar
检查archiver @FILE支持... @
检查strip ... strip
检查ranlib ... ranlib
检查命令解析/ usr / bin / nm -g从gcc对象输出... ok
检查sysroot ... no
检查mt ... mt
检查mt是否为清单tool ... no
检查dlfcn.h ...是
检查objdir ... .libs
检查gcc是否支持-fno-rtti -fno-exceptions ... no
检查gcc选项以产生PIC ... -fPIC -DPIC
检查gcc PIC标志-fPIC -DPIC工作...是
检查gcc静态标志 - 静态工作。 。是
检查gcc是否支持-c -o file.o ...是
检查gcc是否支持-c -o file.o ...(cached)yes
检查gcc链接器(/ usr / bin / ld -m elf_x86_64)支持共享库...是
检查-lc是否应显式链接到... no
检查动态链接器特性... GNU / Linux ld.so
检查如何将库路径硬编码到程序中... immediate
检查是否可能剥离库...是
检查libtool是否支持共享库...是
检查是否构建共享库...是
检查是否构建静态库...是
检查如何运行C ++预处理器... g ++ -E
检查ld使用g ++ ... / usr / bin / ld -m elf_x86_64
检查链接器(/ usr / bin / ld -m elf_x86_64)是否为GNU ld ... yes
检查g ++链接器(/ usr / bin / ld -m elf_x86_64)支持共享库...是
检查g ++选项以产生PIC ... -fPIC -DPIC
检查g ++ PIC标志-fPIC -DPIC是否工作... yes
检查g ++静态标志-static工作...是
检查g ++是否支持-c -o file.o ... yes
检查g ++是否支持-c - o file.o ...(cached)yes
检查g ++链接器(/ usr / bin / ld -m elf_x86_64)是否支持共享库...是
检查动态链接器特性...缓存)GNU / Linux ld.so
检查如何将库路径硬编码到程序中... immediate

***配置映像散列***

检查CImg.h可用性...是
检查CImg.h存在...是
检查CImg.h ...是

***配置视频哈希** *

检查FFmpeg是否存在...检查avcodec_alloc_frame在-lavcodec ...是
检查av_log_set_level在-lavutil ...是
检查av_read_frame在 - lavformat ... yes
在-lswscale中检查sws_getContext ...是

***配置音频散列***

检查sndfile lib是否存在...检查-sf_readf_float in -lsndfile ...是
检查samplerate lib是否存在...检查-lsamplerate中的src_process ...是
检查libmpg123是否存在...检查mpg123_init在-lmpg123 ...是
检查png_create_read_struct在-lpng ...是
检查jpeg_read_header在-ljpeg ...是
检查fftw_plan_dft_r2c_1d在-lfftw3 ... no
检查size_t ...是
检查uint32_t ...是
检查uint8_t ...是
检查uint64_t ...是
检查生成的文件比配置更新... done
配置:创建./config.status
config.status:创建Makefile
config.status:创建src / Makefile
config。状态:创建实例/ Makefile
config.status:创建phash.pc
config.status:创建绑定/ Makefile
config.status:创建绑定/ java / Makefile
config。状态:创建config.h
config.status:创建phash-config.h
config.status:pHash-config.h不变
config.status:执行depfiles命令
config.status:executing libtool commands
francesco @ francesco-VirtualBox:〜/ Scrivania / pHash-0.9.6 $ ^ C
francesco @ francesco-VirtualBox:〜/ Scrivania / pHash-0.9.6 $

但是当我尝试make命令时,我得到这些错误:

  francesco @ francesco-VirtualBox:〜/ Scrivania / pHash-0.9.6 $ make 
make all-recursive
make [1]:ingresso nella目录/home/francesco/Scrivania/pHash-0.9.6
使所有在src
make [2]:ingresso nella目录/home/francesco/Scrivania/pHash-0.9.6/src
/ bin / bash ../libtool --tag = CXX --mode = compile g ++ -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps / pHash。 Tpo -c -o pHash.lo pHash.cpp
libtool:compile:g ++ -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps / pHash。 Tpo -c pHash.cpp -fPIC -DPIC -o .libs / pHash.o
libtool:compile:g ++ -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps / pHash。 Tpo -c pHash.cpp -o pHash.o> / dev / null 2>& 1
mv -f .deps / pHash.Tpo .deps / pHash.Plo
/ bin / bash。 ./libtool --tag = CXX --mode = compile g ++ -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT audiophash.lo -MD -MP -MF .deps / audiophash。 Tpo -c -o audiophash.lo audiophash.cpp
libtool:compile:g ++ -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT audiophash.lo -MD -MP -MF .deps / audiophash。 Tpo -c audiophash.cpp -fPIC -DPIC -o .libs / audiophash.o
libtool:compile:g ++ -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT audiophash.lo -MD -MP -MF .deps / audiophash。 Tpo -c audiophash.cpp -o audiophash.o> / dev / null 2>& 1
mv -f .deps / audiophash.Tpo .deps / audiophash.Plo
/ bin / bash。 ./libtool --tag = CC --mode = compile gcc -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT ph_fft.lo -MD -MP -MF .deps / ph_fft。 Tpo -c -o ph_fft.lo ph_fft.c
libtool:compile:gcc -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT ph_fft.lo -MD -MP -MF .deps / ph_fft。 Tpo -c ph_fft.c -fPIC -DPIC -o .libs / ph_fft.o
libtool:compile:gcc -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT ph_fft.lo -MD -MP -MF .deps / ph_fft。 Tpo -c ph_fft.c -o ph_fft.o> / dev / null 2>& 1
mv -f .deps / ph_fft.Tpo .deps / ph_fft.Plo
/ bin / bash。 ./libtool --tag = CXX --mode = compile g ++ -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT cimgffmpeg.lo -MD -MP -MF .deps / cimgffmpeg。 Tpo -c -o cimgffmpeg.lo cimgffmpeg.cpp
libtool:compile:g ++ -DHAVE_CONFIG_H -I。 -I .. -pthread -I / usr / local / include -I / usr / include / ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT cimgffmpeg.lo -MD -MP -MF .deps / cimgffmpeg。 Tpo -c cimgffmpeg.cpp -fPIC -DPIC -o .libs / cimgffmpeg.o
cimgffmpeg.cpp:在函数'int ReadFrames(VFInfo *,cimg_library :: CImgList< unsigned char> *,unsigned int,unsigned int )':
cimgffmpeg.cpp:103:9:warning:'AVFrame * avcodec_alloc_frame()'已弃用(在/usr/include/libavcodec/avcodec.h:3195声明)[-Wdeprecated- declarations]
pFrame = avcodec_alloc_frame();
^
cimgffmpeg.cpp:103:29:warning:'AVFrame * avcodec_alloc_frame()'已弃用(在/usr/include/libavcodec/avcodec.h:3195声明)[-Wdeprecated-declarations]
pFrame = avcodec_alloc_frame();
^
cimgffmpeg.cpp:108:29:warning:'AVFrame * avcodec_alloc_frame()'已弃用(在/usr/include/libavcodec/avcodec.h:3195声明)[-Wdeprecated-declarations]
AVFrame * pConvertedFrame = avcodec_alloc_frame();
^
cimgffmpeg.cpp:108:49:warning:'AVFrame * avcodec_alloc_frame()'已弃用(在/usr/include/libavcodec/avcodec.h:3195声明)[-Wdeprecated-declarations]
AVFrame * pConvertedFrame = avcodec_alloc_frame();
^
cimgffmpeg.cpp:in function'int NextFrames(VFInfo *,cimg_library :: CImgList< unsigned char> *)':
cimgffmpeg.cpp:257:9:warning:'AVFrame * avcodec_alloc_frame()'被弃用(在/usr/include/libavcodec/avcodec.h:3195声明)[-Wdeprecated-declarations]
pFrame = avcodec_alloc_frame();
^
cimgffmpeg.cpp:257:29:warning:'AVFrame * avcodec_alloc_frame()'已弃用(在/usr/include/libavcodec/avcodec.h:3195声明)[-Wdeprecated- declarations]
pFrame = avcodec_alloc_frame();
^
cimgffmpeg.cpp:260:29:warning:'AVFrame * avcodec_alloc_frame()'已弃用(在/usr/include/libavcodec/avcodec.h:3195声明)[-Wdeprecated- declarations]
AVFrame * pConvertedFrame = avcodec_alloc_frame();
^
cimgffmpeg.cpp:260:49:warning:'AVFrame * avcodec_alloc_frame()'已弃用(在/usr/include/libavcodec/avcodec.h:3195声明)[-Wdeprecated-declarations]
AVFrame * pConvertedFrame = avcodec_alloc_frame();
^
cimgffmpeg.cpp:在函数'float fps(const char *)':
cimgffmpeg.cpp:434:47:error:'AVStream'没有成员名为'r_frame_rate'
int num =(pFormatCtx-> streams [videoStream] - > r_frame_rate).num;
^
cimgffmpeg.cpp:435:47:error:'AVStream'没有名为'r_frame_rate'的成员
int den =(pFormatCtx-> streams [videoStream] - > r_frame_rate) .den;
^
Makefile:388:set di istruzioni per l'obiettivocimgffmpeg.lonon riuscito
make [2]:*** [cimgffmpeg.lo] Errore 1
make [2]:uscita dalla目录/home/francesco/Scrivania/pHash-0.9.6/src
Makefile:419:set di istruzioni per l'obiettivoall-recursivenon riuscito
make [1]:*** [all-recursive] Errore 1
make [1]:uscita dalla directory/home/francesco/Scrivania/pHash-0.9.6
Makefile:298:set全部非riuscito
make:*** [all] Errore 2
francesco @ francesco-VirtualBox:〜/ Scrivania / pHash-0.9.6 $

有些可以帮我了解错误的原因吗?

方案

看起来库 pHash 不再维护。但是,如果需要一些快速解决方案使用库功能,它可以安装在兼容的Linux版本。在这种情况下,可以设置一些虚拟服务器实例。



该库对于Ubuntu 10.04来说太新了,因为它使用了2011-2013年引入的功能。 p>

这个库对于Ubuntu 14.04来说太旧了。



我可以在Ubuntu 12.10

  

#安装库中列出的库
sudo apt-get install libavformat-dev libmpg123-dev libsamplerate-dev libsndfile-dev cimg-dev libavcodec-dev ffmpeg libswscale-dev
#phash使用的其他库还要安装
sudo apt-get install libpng12-dev libjpeg62-dev libfftw3-dev
#configurate使用自定义安装路径
./configure --prefix = / home / username / dev /
make
make install

#提供头文件和库路径的build测试应用程序
g ++ phash-test.cpp -I ../ include -L ../ lib - lpHash -o phash-test
#运行提供库搜索路径的测试应用程序
LD_LIBRARY_PATH = / home / username / dev / lib:$ LD_LIBRARY_PATH ./phash-test


So I was trying to install the pHash libraries on Ubuntu. I've installed all the required packages running this command:

apt-get install libavformat-dev libmpg123-dev libsamplerate-dev libsndfile-dev cimg-dev libavcodec-dev ffmpeg libswscale-dev

Then I run ./configure and everything seems ok, I got this:

francesco@francesco-VirtualBox:~$ cd '/home/francesco/Scrivania/pHash-0.9.6' 
francesco@francesco-VirtualBox:~/Scrivania/pHash-0.9.6$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for /etc/gentoo-release... no
checking for /etc/redhat-release... no
checking for /etc/slackware-version... no
checking for /etc/debian_version... yes
checking for /etc/SuSErelease... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether ln -s works... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate

*** Configuring image hash ***

checking CImg.h usability... yes
checking CImg.h presence... yes
checking for CImg.h... yes

*** Configuring video Hash ***

checking whether FFmpeg is present... checking for avcodec_alloc_frame in -lavcodec... yes
checking for av_log_set_level in -lavutil... yes
checking for av_read_frame in -lavformat... yes
checking for sws_getContext in -lswscale... yes

*** Configuring audio hash ***

checking whether sndfile lib is present... checking for sf_readf_float in -lsndfile... yes
checking whether samplerate lib is present... checking for src_process in -lsamplerate... yes
checking whether libmpg123 is present... checking for mpg123_init in -lmpg123... yes
checking for png_create_read_struct in -lpng... yes
checking for jpeg_read_header in -ljpeg... yes
checking for fftw_plan_dft_r2c_1d in -lfftw3... no
checking for size_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for uint64_t... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating examples/Makefile
config.status: creating pHash.pc
config.status: creating bindings/Makefile
config.status: creating bindings/java/Makefile
config.status: creating config.h
config.status: creating pHash-config.h
config.status: pHash-config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
francesco@francesco-VirtualBox:~/Scrivania/pHash-0.9.6$ ^C
francesco@francesco-VirtualBox:~/Scrivania/pHash-0.9.6$ 

But when I try the make command I get these errors:

francesco@francesco-VirtualBox:~/Scrivania/pHash-0.9.6$ make
make  all-recursive
make[1]: ingresso nella directory "/home/francesco/Scrivania/pHash-0.9.6"
Making all in src
make[2]: ingresso nella directory "/home/francesco/Scrivania/pHash-0.9.6/src"
/bin/bash ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..   -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg  -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps/pHash.Tpo -c -o pHash.lo pHash.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps/pHash.Tpo -c pHash.cpp  -fPIC -DPIC -o .libs/pHash.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps/pHash.Tpo -c pHash.cpp -o pHash.o >/dev/null 2>&1
mv -f .deps/pHash.Tpo .deps/pHash.Plo
/bin/bash ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..   -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg  -O2 -ffast-math -O3 -MT audiophash.lo -MD -MP -MF .deps/audiophash.Tpo -c -o audiophash.lo audiophash.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT audiophash.lo -MD -MP -MF .deps/audiophash.Tpo -c audiophash.cpp  -fPIC -DPIC -o .libs/audiophash.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT audiophash.lo -MD -MP -MF .deps/audiophash.Tpo -c audiophash.cpp -o audiophash.o >/dev/null 2>&1
mv -f .deps/audiophash.Tpo .deps/audiophash.Plo
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg  -O2 -ffast-math -O3 -MT ph_fft.lo -MD -MP -MF .deps/ph_fft.Tpo -c -o ph_fft.lo ph_fft.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT ph_fft.lo -MD -MP -MF .deps/ph_fft.Tpo -c ph_fft.c  -fPIC -DPIC -o .libs/ph_fft.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT ph_fft.lo -MD -MP -MF .deps/ph_fft.Tpo -c ph_fft.c -o ph_fft.o >/dev/null 2>&1
mv -f .deps/ph_fft.Tpo .deps/ph_fft.Plo
/bin/bash ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..   -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg  -O2 -ffast-math -O3 -MT cimgffmpeg.lo -MD -MP -MF .deps/cimgffmpeg.Tpo -c -o cimgffmpeg.lo cimgffmpeg.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/local/include -I/usr/include/ffmpeg -Dcimg_use_png -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT cimgffmpeg.lo -MD -MP -MF .deps/cimgffmpeg.Tpo -c cimgffmpeg.cpp  -fPIC -DPIC -o .libs/cimgffmpeg.o
cimgffmpeg.cpp: In function 'int ReadFrames(VFInfo*, cimg_library::CImgList<unsigned char>*, unsigned int, unsigned int)':
cimgffmpeg.cpp:103:9: warning: 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3195) [-Wdeprecated-declarations]
  pFrame=avcodec_alloc_frame();
         ^
cimgffmpeg.cpp:103:29: warning: 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3195) [-Wdeprecated-declarations]
  pFrame=avcodec_alloc_frame();
                             ^
cimgffmpeg.cpp:108:29: warning: 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3195) [-Wdeprecated-declarations]
  AVFrame *pConvertedFrame = avcodec_alloc_frame();
                             ^
cimgffmpeg.cpp:108:49: warning: 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3195) [-Wdeprecated-declarations]
  AVFrame *pConvertedFrame = avcodec_alloc_frame();
                                                 ^
cimgffmpeg.cpp: In function 'int NextFrames(VFInfo*, cimg_library::CImgList<unsigned char>*)':
cimgffmpeg.cpp:257:9: warning: 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3195) [-Wdeprecated-declarations]
  pFrame=avcodec_alloc_frame();
         ^
cimgffmpeg.cpp:257:29: warning: 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3195) [-Wdeprecated-declarations]
  pFrame=avcodec_alloc_frame();
                             ^
cimgffmpeg.cpp:260:29: warning: 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3195) [-Wdeprecated-declarations]
  AVFrame *pConvertedFrame = avcodec_alloc_frame();
                             ^
cimgffmpeg.cpp:260:49: warning: 'AVFrame* avcodec_alloc_frame()' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3195) [-Wdeprecated-declarations]
  AVFrame *pConvertedFrame = avcodec_alloc_frame();
                                                 ^
cimgffmpeg.cpp: In function 'float fps(const char*)':
cimgffmpeg.cpp:434:47: error: 'AVStream' has no member named 'r_frame_rate'
  int num = (pFormatCtx->streams[videoStream]->r_frame_rate).num;
                                               ^
cimgffmpeg.cpp:435:47: error: 'AVStream' has no member named 'r_frame_rate'
  int den = (pFormatCtx->streams[videoStream]->r_frame_rate).den;
                                               ^
Makefile:388: set di istruzioni per l'obiettivo "cimgffmpeg.lo" non riuscito
make[2]: *** [cimgffmpeg.lo] Errore 1
make[2]: uscita dalla directory "/home/francesco/Scrivania/pHash-0.9.6/src"
Makefile:419: set di istruzioni per l'obiettivo "all-recursive" non riuscito
make[1]: *** [all-recursive] Errore 1
make[1]: uscita dalla directory "/home/francesco/Scrivania/pHash-0.9.6"
Makefile:298: set di istruzioni per l'obiettivo "all" non riuscito
make: *** [all] Errore 2
francesco@francesco-VirtualBox:~/Scrivania/pHash-0.9.6$ 

Some can help me to understamd what's wrong?

解决方案

It looks that the library pHash is not maintained anymore. However, if it is needed for some quick solution using the library functionality it can be installed on compatible Linux version. In that case it is possible to set up some virtual server instance.

The library is too new for Ubuntu 10.04, since it uses functions introduced in 2011-2013.

The library is too old for Ubuntu 14.04.

I was able to build the library on Ubuntu 12.10 out of the box (one can also try 12.04).

HowTo:

# install libraries listed in the question
sudo apt-get install libavformat-dev libmpg123-dev libsamplerate-dev libsndfile-dev cimg-dev libavcodec-dev ffmpeg libswscale-dev
# some other libraries used by pHash can be also installed
sudo apt-get install libpng12-dev libjpeg62-dev libfftw3-dev
# configurate with custom install path
./configure --prefix=/home/username/dev/
make
make install

# build test application providing header and library path
g++ phash-test.cpp -I../include -L../lib -lpHash -o phash-test
# run test application providing library search path
LD_LIBRARY_PATH=/home/username/dev/lib:$LD_LIBRARY_PATH ./phash-test

这篇关于在Ubuntu上安装pHash时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆