install opencv on ubuntu 18.04 - c++

I've been trying to install opencv, using this referance. But when I try to run make command, I get error as follows:
/opt/opencv/modules/videoio/src/cap_dc1394_v2.cpp:59:10: fatal error:
dc1394/dc1394.h: No such file or directory
#include <dc1394/dc1394.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:278: recipe for
target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o'
failed
make[2]: ***
[modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o] Error
1
CMakeFiles/Makefile2:6307: recipe for target
'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I tried so many times to install opencv, when the installation is completed, I tried to check the installation, and then I get error that there is no module named opencv.

I recommend to use this guide to download the OpenCV Libary to the linux. (ubuntu 18.04).
I did it today on my ubuntu 18.04 and it worked perfectly, but please read all the guide and don't just copy the terminal commands.

Related

Error while running make command [Packet Generator in DPDK]

I am trying to install packet generator in my system. I have downloaded packet generator from DPDK.org. I follow the instructions mentioned in the following link.
When I run the make command I get the below error:
/root/DPDK/pktgen-dpdk/app/pktgen-latency.c:17:25: fatal error: rte_bus_pci.h: No such file or directory
compilation terminated.
/root/DPDK/dpdk-stable-17.08.1//mk/internal/rte.compile-pre.mk:138:
recipe for target 'pktgen-latency.o' failed
make[2]: *** [pktgen-latency.o] Error 1
/root/DPDK/dpdk-stable-17.08.1//mk/rte.extapp.mk:47: recipe for
target 'pktgen' failed
make[1]: *** [pktgen] Error 2
/root/DPDK/dpdk-stable-17.08.1//mk/rte.extsubdir.mk:48: recipe for
target 'app' failed
make: *** [app] Error 2
Upgrading the version of DPDK solves this issue. I used a version of 17.08 and later on upgraded it to 17.11
Looks like the RTE_TARGET is set incorrectly or DPDK is not compiled. First we set:
export RTE_SDK=<DPDKInstallDir>
export RTE_TARGET=x86_64-native-linuxapp-gcc
Then we compile DPDK and then Pktgen.

Error while compiling Ogre code

OS: Ubuntu 16.04
Ogre: v1.9
I am trying to compile code from this repository. Although it is meant for Ogre v1.9, it is giving me this error:
In file included from /home/cortana/Desktop/clean-project/src/BaseApplication.cpp:17:0:
/home/cortana/Desktop/clean-project/src/BaseApplication.h:34:22: fatal error: SdkTrays.h: No such file or directory
compilation terminated.
CMakeFiles/OgreApp.dir/build.make:62: recipe for target 'CMakeFiles/OgreApp.dir/src/BaseApplication.cpp.o' failed
make[2]: *** [CMakeFiles/OgreApp.dir/src/BaseApplication.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/OgreApp.dir/all' failed
make[1]: *** [CMakeFiles/OgreApp.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
How can I fix this error?
As already mentioned in the comments, you need to make sure that your compiler is able to find the file "SdkTrays.h".
You claimed that this file is not part of Ogre version 1.9, which however is not correct. It could be that it is not part of the unofficial repository you are using. In our official one, it can be found here:
SdkTrays.h in official Ogre 1.9

Cannot "make" verlihub on Debian

I'm trying to create my own dchub on Debian using Verlihub. Everything works great when I'm using ./configure but when I'm trying to "make", it ends with an error! Please help!
./configure gives back:
Configure has completed successfully. Now you must run make.
If make fails with errors, please consult the forums and see
if anyone else has had the same issue. The forums are located
here http://forums.verlihub-project.org
Extensive documentation is also available at the project website
which can be found here http://www.verlihub-project.org
Please feel free to join and register at the Verlihub suport
hub located here dchub://hub.verlihub-project.org:7777
sudo make gives back:
stringutils.cpp: In function 'void nStringUtils::ExpandPath(std::string&)':
stringutils.cpp:127:31: error: 'get_current_dir_name' was not declared in this scope
make[2]: *** [stringutils.lo] Error 1
make[2]: Leaving directory `/verlihub-0.9.8e-r2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/verlihub-0.9.8e-r2'
make: *** [all] Error 2

Errors when install pocketsphinx 0.7 on Windows 7 using Cygwin

I tried to install pocketsphinx version 0.7 on my Windows 7 using Cygwin (I have installed sphinxbase 0.7). I face some errors with "make" command. Please help me. Thank you very much !!!
Makefile:316: recipe for target pocketsphinx_continuous.exe' failed
make[2]: *** [pocketsphinx_continuous.exe] Error 1
make[2]: Leaving directory/cygdrive/d/Cao_Hoc/Luan_Van/test_Android_ASR/test_1/pocketsphinx-0.7/src/programs'
Makefile:271: recipe for target all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory/cygdrive/d/Cao_Hoc/Luan_Van/test_Android_ASR/test_1/pocketsphinx-0.7/src'
Makefile:372: recipe for target `all-recursive' failed
make: * [all-recursive] Error 1
This is the full log: http://www.mediafire.com/view/?34577vncq1rqu7b
For Cygwin do not use version 0.7. Download latest snapshot, it should compile better
http://cmusphinx.sourceforge.net/wiki/download

Installing Apache Kudu on WSL

I am trying to install Apache Kudu and run the C++ examples on my Ubuntu distribution (18.04) on WSL. I am following the instructions for Ubuntu at https://kudu.apache.org/docs/installation.html
Everything runs smoothly until I get to step 6 where I run
make -j4
I get the following errors
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:155)
at java.util.zip.ZipFile.<init>(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:235)
at org.gradle.wrapper.Install.access$900(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:81)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
CMakeFiles/init_gradle.dir/build.make:60: recipe for target '../../java/gradle/wrapper/gradle-wrapper.jar' failed
make[2]: *** [../../java/gradle/wrapper/gradle-wrapper.jar] Error 1
make[2]: *** Deleting file '../../java/gradle/wrapper/gradle-wrapper.jar'
CMakeFiles/Makefile2:1708: recipe for target 'CMakeFiles/init_gradle.dir/all' failed
make[1]: *** [CMakeFiles/init_gradle.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 5%] Built target kudu_util_pb_util_proto
[ 5%] Built target kudu_util_hash_proto
[ 6%] Built target hms_thrift
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Image of error
Does anybody know what is causing the errors?
Happened to met same situation.
This exception is happened when building hms. And you can found verbose log by doing
cd <root_of_kudu>/java
./gradlew assemble
The problems I met is the zip of downloaded gradle seems wrong, so I cleaned ~/.gradle/wrapper/dists/gradle-6.2.2-all/2k4hz1yffuhb6ob9prdg10tx/gradle-6.2.2-all.zip and <root_of_kudu>/java/gradle/wrapper/gradle-wrapper.jar. And try to call make -j4 again.
Further more, if you happened to have same bad network like mine, you can download the gradle zip manually, by checking the content of <root_of_kudu>/java/gradlew, the line with curl tells you the download link, try to download it with a good network or a proxy and then place it to the first path you cleaned, it may work.