Error while installing OpenALPR on Raspberry PI 3 - linux

I have just started using Raspberry PI 3. I'm trying to install an open source library named as OpenALPR on it. It's a library that takes an image of a vehicle's license plate as an argument and returns the text written on it. I've been following this link to install the library.
https://blog.vinczejanos.info/2017/05/01/install-openalpr-on-raspberry-pi-3-part-2/
I'm on the install OpenALPR step specified in the above link. I've encountered the following error on the last build command of that step i.e. make install
[ 21%] Built target support
[ 23%] Built target video
[ 51%] Built target openalpr
[ 52%] Built target alpr
[ 55%] Built target alprd
[ 56%] Built target openalpr-utils-prepcharsfortraining
[ 59%] Built target openalpr-utils-benchmark
[ 60%] Built target openalpr-utils-binarizefontsheet
[ 61%] Built target openalpr-utils-classifychars
[ 63%] Built target openalpr-utils-calibrate
[ 64%] Built target openalpr-utils-tagplates
[ 66%] Built target openalpr-utils-sortstate
[ 69%] Built target unittests
[ 96%] Built target openalpr-static
[ 97%] Built target simpleini
[ 99%] Built target openalprpy
[100%] Built target openalprgo
Install the project...
-- Install configuration: "RelWithDebugInfo"
-- Installing: /usr/bin/alpr
CMake Error at cmake_install.cmake:50 (file):
file INSTALL cannot copy file "/usr/src/openalpr/src/build/alpr" to
"/usr/bin/alpr".
Makefile:126: recipe for target 'install' failed
make: *** [install] Error 1
I can assure that all the steps above this one have been completed successfully. Please guide me regarding this error. Thanks.

The error has been resolved. All I did was executed the command make install without sudo which didn't give permission to copy files. Once I executed it as sudo make install it executed perfectly and is working now.

Related

Bazel doesn't find tensorflow packages for C++ example code

I try to make this example work, but everytime I try to build the program with bazel I get this error message:
bazel build //code:label_image
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: Analysis of target '//code:label_image' failed; build aborted.
INFO: Elapsed time: 1.261s
I saved the exact source code from github in a directory called code. I installed tensorflow in an (active) virtual environment via pip: pip3 install --upgrade tensorflow. I use arch linux.
Why doesn't bazel find the proper packages? I'm quite new to bazel/tensorflow. Where are these packages saved? Do I have to specify them explicitely somewhere?
Typically, extracting a subfolder from a project that uses Bazel and building it separately does not work.
If you look into the BUILD file of the label_image folder, you will see this definition for a C++ binary:
cc_binary(
name = "label_image",
srcs = [
"main.cc",
],
linkopts = select({
"//tensorflow:android": [
"-pie",
"-landroid",
"-ljnigraphics",
"-llog",
"-lm",
"-z defs",
"-s",
"-Wl,--exclude-libs,ALL",
],
"//conditions:default": ["-lm"],
}),
deps = select({
"//tensorflow:android": [
# cc:cc_ops is used to include image ops (for label_image)
# Jpg, gif, and png related code won't be included
"//tensorflow/cc:cc_ops",
"//tensorflow/core:android_tensorflow_lib",
# cc:android_tensorflow_image_op is for including jpeg/gif/png
# decoder to enable real-image evaluation on Android
"//tensorflow/core/kernels:android_tensorflow_image_op",
],
"//conditions:default": [
"//tensorflow/cc:cc_ops",
"//tensorflow/core:core_cpu",
"//tensorflow/core:framework",
"//tensorflow/core:framework_internal",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:tensorflow",
],
}),
)
This rule tells Bazel what the label_image binary requires to be built. Notably, it has dependencies (deps) and link options (linkopts) that point to the root of the tensorflow workspace (//tensorflow, defined by the WORKSPACE file), which is missing from your extracted subfolder. This is the reason why Bazel is complaining that it cannot find the package tensorflow.
The easiest way to build the label_image binary is to build it from within the tensorflow project, since the paths are already set up.

PCL 1.8.0 installation: Compile error for including QtGui

I'm trying to build PCL 1.8.0 on my Ubuntu 14.04 machine from source, following these instructions. But every time I get the following error:
[ 73%] Building CXX object apps/CMakeFiles/pcl_manual_registration.dir/include/pcl/apps/moc_manual_registration.cpp.o
In file included from ~/pcl/release/apps/ui_manual_registration.h:26:0,
from ~/pcl/release/apps/include/pcl/apps/../../../../../apps/include/pcl/apps/manual_registration.h:37,
from ~/pcl/release/apps/include/pcl/apps/moc_manual_registration.cpp:9:
/usr/include/vtk-5.8/QVTKWidget.h:40:25: fatal error: QtGui/QWidget: No such file or directory
#include <QtGui/QWidget>
^
compilation terminated.
make[2]: *** [apps/CMakeFiles/pcl_manual_registration.dir/include/pcl/apps/moc_manual_registration.cpp.o] Error 1
make[1]: *** [apps/CMakeFiles/pcl_manual_registration.dir/all] Error 2
make: *** [all] Error 2
for locate QWidget I get amongst others the following output:
...
/usr/include/qt4/QtGui/QWidget
...
/usr/include/qt5/QtWidgets/QWidget
...
So how can I resolve the error and install pcl?
The problem happens because your configuration is trying to mix Qt4 and Qt5 during PCL build.
According to the link you've provided, PCL is suppossed so be built against Qt4 in this case.
Try to remove everything in release directory and re-initialize CMake config with correct version of Qt.
Like that (following provided example):
cd ~/Documents/pcl
rm -rf relese
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release -DPCL_QT_VERSION=4 -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON ..
make

how to remove error in mosquitto installation

i'm trying to install mosquitto-1.3 in Linux, for doing this follow he step.
1- wget http://mosquitto.org/files/source/mosquitto-1.3.tar.gz
2- tar -zxvf mosquitto-1.3.tar.gz
3- cd mosquitto-1.3
4- cmake .
5- make install
Then it start fine but in the mid it breaks and show an error.
[root#localhost mosquitto-1.3]# make install
Scanning dependencies of target libmosquitto<br/>
[ 2%] Building C object lib/CMakeFiles/libmosquitto.dir/logging_mosq.c.o<br/>
[ 4%] Building C object lib/CMakeFiles/libmosquitto.dir/memory_mosq.c.o<br/>
[ 6%] Building C object lib/CMakeFiles/libmosquitto.dir/messages_mosq.c.o<br/>
[ 8%] Building C object lib/CMakeFiles/libmosquitto.dir/mosquitto.c.o<br/>
[ 10%] Building C object lib/CMakeFiles/libmosquitto.dir/net_mosq.c.o<br/>
[ 13%] Building C object lib/CMakeFiles/libmosquitto.dir/read_handle.c.o<br/>
[ 15%] Building C object lib/CMakeFiles/libmosquitto.dir /read_handle_client.c.o<br/>
[ 17%] Building C object lib/CMakeFiles/libmosquitto.dir /read_handle_shared.c.o<br/>
[ 19%] Building C object lib/CMakeFiles/libmosquitto.dir/send_client_mosq.c.o<br/>
[ 21%] Building C object lib/CMakeFiles/libmosquitto.dir/send_mosq.c.o<br/>
[ 23%] Building C object lib/CMakeFiles/libmosquitto.dir/srv_mosq.c.o<br/>
[ 26%] Building C object lib/CMakeFiles/libmosquitto.dir/thread_mosq.c.o<br/>
[ 28%] Building C object lib/CMakeFiles/libmosquitto.dir/time_mosq.c.o<br/>
[ 30%] Building C object lib/CMakeFiles/libmosquitto.dir/tls_mosq.c.o<br/>
[ 32%] Building C object lib/CMakeFiles/libmosquitto.dir/util_mosq.c.o<br/>
[ 34%] Building C object lib/CMakeFiles/libmosquitto.dir/will_mosq.c.o<br/>
Linking C shared library libmosquitto.so<br/>
/usr/bin/ld: cannot find -lcares<br/>
collect2: ld returned 1 exit status<br/>
make[2]: *** [lib/libmosquitto.so.1.3] Error 1<br/>
make[1]: *** [lib/CMakeFiles/libmosquitto.dir/all] Error 2<br/>
make: *** [all] Error 2<br/>
What can i do with this... help me... Thanks.
Looks like you don't have c-ares installed on your system. Please refer to compiling.txt file in source tree.
The following packages are required for mosquitto:
* tcp-wrappers (optional, package name libwrap0-dev)
* openssl (version 1.0.0 or greater if TLS-PSK support is needed, can be disabled)
* c-ares (for DNS-SRV support, can be disabled)
* libuuid (from e2fsprogs, can be disabled)
* On Windows, the Redhat pthreads library is required if threading support is
to be included.
To compile, run "make", but also see the file config.mk for more details on the
various options that can be compiled in.
Where possible use the Makefiles to compile. This is particularly relevant for
the client libraries as symbol information will be included. Use cmake to
compile on Windows or Mac.
If you have any questions, problems or suggestions (particularly related to
installing on a more unusual device like a plug-computer) then please get in
touch using the details in readme.txt.

glfw makefile fails upon "generating html documentation" on Ubuntu

I am trying to compile and install glfw 3.1.1 for Ubuntu 14.10. The cmake finished successfully, however, when I go to execute the makefile through make it fails at the following:
[ 98%] Building C object tests/CMakeFiles/windows.dir/windows.c.o
Linking C executable windows
[ 98%] Built target windows
Scanning dependencies of target docs
[100%] Generating HTML documentation
Error: tag HTML_HEADER: header file `/home/dennis/Documents/LearningOpenGL/glfw-3.1.1/docs/header.html' does not exist
docs/CMakeFiles/docs.dir/build.make:52: recipe for target 'docs/CMakeFiles/docs' failed
make[2]: *** [docs/CMakeFiles/docs] Error 1
CMakeFiles/Makefile2:1184: recipe for target 'docs/CMakeFiles/docs.dir/all' failed
make[1]: *** [docs/CMakeFiles/docs.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
At first I thought that it is failing an optional step but then I realized that I can't compile my test project as it complains about the glfw header:
main.cpp:2:24: fatal error: GLFW/glfw3.h: No such file or directory
#include <GLFW/glfw3.h>
Thanks
Found the answer! I had to disable the "build documentation" option in the cmake gui.
It seems you just skip compiling the doc instead of fix it.
Simply go to docs/CMakeFiles/docs.dir, modify the file build.make.
For the build target docs/CMakeFiles/docs:, change the doxygen command
from:
doxygen.exe
to
doxygen.exe .

build octave package from source

I want to install octaviz package in octave software.
From the documentation there is stated:
-You'll need octave 2.1.53 or later and VTK CVS to build octaviz. To compile octaviz, run ccmake . in the root directory of the source tree, then make and finally make install.
I first ran ccmake ., and it completed successfully after I installed some libs that I was missing.
But, the I ran "make" and it exits with the following errors:
>> make
[ 1%] Built target vtkWrapOctave
[ 1%] Building CXX object Common/CMakeFiles/octaviz.dir/octaviz.o
/home/user12345/octave/octaviz/Common/octaviz.cc:31:24: fatal error: octave/oct.h: No such file or directory
#include <octave/oct.h>
^
compilation terminated.
make[2]: *** [Common/CMakeFiles/octaviz.dir/octaviz.o] Error 1
make[1]: *** [Common/CMakeFiles/octaviz.dir/all] Error 2
make: *** [all] Error 2
Any idea what I am missing here?
You are missing the octave/oct.h header. This usually means that you don't have Octave installed. If you do have it installed, maybe you are missing the header files and shared libraries (if you are using Linux, did you install octave's -dev or -devel packaqes?) If you have them installed, you must have ran the configure script incorrectly. Either specify the correct options or set the CXX_FLAGS. If you don't know about compiler flags you probably should not change them and instead figure out how to install the octave libraries correctly.

Resources