我被困了一个星期,试图在我没有root权限的大学托管的服务器上安装iDT(https://github.com/chuckcho/iDT)。 (VERSION = 12.04.5 LTS)
我尝试在本教程的一部分(不同版本)之后安装2个主要库(opencv和ffmpeg):http://dridini.blogspot.com/
我设法(在我看来)将库安装在本地:
ffmpeg -version
ffmpeg version N-93084-g835ab35 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/home/XXXXX/ffmpeg_build --extra-cflags=-I/home/XXXXX/ffmpeg_build/include --extra-ldflags=-L/home/XXXXX/ffmpeg_build/lib --bindir=/home/XXXXX/bin --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-pic --enable-shared
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 46.100 / 58. 46.100
libavformat 58. 26.100 / 58. 26.100
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
pkg-config --modversion opencv
2.4.13.5
我导出了所有.so所在的LD_LIBRARY_PATH(之后我无法执行ldconfig) 但是当我尝试这样做时,结果就是:
g++ -L/home/chuck/opencv-2.4.11-cuda7.5/lib -L/opt/lib -pipe -Wall -O3 -ggdb -o release/DenseTrackStab -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc -lopencv_calib3d -lopencv_features2d -lopencv_nonfree -lopencv_ocl -lavformat -lavdevice -lavutil -lavcodec -lswscale
/usr/bin/ld: cannot find -lopencv_core
/usr/bin/ld: cannot find -lopencv_highgui
/usr/bin/ld: cannot find -lopencv_video
/usr/bin/ld: cannot find -lopencv_imgproc
/usr/bin/ld: cannot find -lopencv_calib3d
/usr/bin/ld: cannot find -lopencv_features2d
/usr/bin/ld: cannot find -lopencv_nonfree
/usr/bin/ld: cannot find -lopencv_ocl
/usr/bin/ld: cannot find -lavformat
/usr/bin/ld: cannot find -lavdevice
/usr/bin/ld: cannot find -lavutil
/usr/bin/ld: cannot find -lavcodec
/usr/bin/ld: cannot find -lswscale
collect2: ld returned 1 exit status
make: *** [release/DenseTrackStab] Error 1
我试图修改makeFile以便在其中添加路径或使用ldflag输入make(make“ LDFLAGS = -L / $ HOME / lib / opencv-2.4.13.5 / lib / -L / $ HOME / ffmpeg_build / lib”)给我相同的结果:
g++ -L/home/XXXXX/opencv-2.4.13.5/release/lib -L/opt/lib -pipe -Wall -O3 -ggdb -o release/DenseTrackStab -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc -lopencv_calib3d -lopencv_features2d -lopencv_nonfree -lopencv_ocl -lavformat -lavdevice -lavutil -lavcodec -lswscale
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 10
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 10
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 2
这是原始的Makefile
# custom opencv
OPENCV_INC := /home/chuck/opencv-2.4.11-cuda7.5/include
OPENCV_LIB := /home/chuck/opencv-2.4.11-cuda7.5/lib
# set the binaries that have to be built
TARGETS := DenseTrackStab Video
# set the build configuration set
BUILD := release
#BUILD := debug
# set bin and build dirs
BUILDDIR := .build_$(BUILD)
BINDIR := $(BUILD)
# libraries
LDLIBS = $(addprefix -l, $(LIBS) $(LIBS_$(notdir $*)))
LIBS := \
opencv_core opencv_highgui opencv_video opencv_imgproc opencv_calib3d opencv_features2d opencv_nonfree \
opencv_ocl \
avformat avdevice avutil avcodec swscale
# set some flags and compiler/linker specific commands
CXXFLAGS = -pipe -D __STDC_CONSTANT_MACROS -D STD=std -Wall $(CXXFLAGS_$(BUILD)) -I. -I$(OPENCV_INC) -I/opt/include
CXXFLAGS_debug := -ggdb
CXXFLAGS_release := -O3 -DNDEBUG -ggdb
LDFLAGS = -L$(OPENCV_LIB) -L/opt/lib -pipe -Wall $(LDFLAGS_$(BUILD))
LDFLAGS_debug := -ggdb
LDFLAGS_release := -O3 -ggdb
include make/generic.mk
我可能要做的事还是必须放弃?使用此软件有更好的解决方案吗? 谢谢