Can't activate Lua-support in freeswitch - lua

If activating Lua-Support in modules.conf, ./configure, make , install yields the following error:
*
making install mod_lua
make[4]: Entering directory '/home/jklou/jkl/fs/freeswitch-1.8.2/src/mod/languages/mod_lua'
CXX mod_lua_la-mod_lua.lo
mod_lua.cpp:37:17: fatal error: lua.h: 没有那个文件或目录
compilation terminated.
Makefile:687: recipe for target 'mod_lua_la-mod_lua.lo' failed
make[4]: *** [mod_lua_la-mod_lua.lo] Error 1
make[4]: Leaving directory '/home/jklou/jkl/fs/freeswitch-1.8.2/src/mod/languages/mod_lua'
Makefile:679: recipe for target 'mod_lua-install' failed
make[3]: *** [mod_lua-install] Error 1
make[3]: Leaving directory '/home/jklou/jkl/fs/freeswitch-1.8.2/src/mod'
Makefile:587: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory '/home/jklou/jkl/fs/freeswitch-1.8.2/src'
Makefile:3257: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/jklou/jkl/fs/freeswitch-1.8.2'
Makefile:3729: recipe for target 'install' failed
make: *** [install] Error 2
*
so Lua cannot be used.
Google: Several Forums advise to refresh the GIT-repository, but this cannot be used because I need an older Version of freeswitch

I've found a solution:
apt-get install libreadline-dev apt-get install lua5.2 lua5.2-doc liblua5.2-dev
then copy LUA-sh-files to LUA-mod-directory of Freeswitch:
cp /usr/include/lua5.2/*.h [Installationsverzeichnis Freeswitch]]/src/mod/languages/mod_lua/
then link it:
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.so /usr/lib/x86_64-linux-gnu/liblua.so
then repeat make install (don't repeat ./configure and make)
sudo make install
this worked perfectly for me (Freeswitch 1.8.2. and Ubuntu 18.04 LTS running in Virtual Box)

Related

Make does not detect opencv_contrib even though I have it installed

I am trying to get this running https://github.com/Katou2/Optical_Flow_GPU_Opencv3 but am facing an issue where make does not detect my opencv_contrib module. Here are the steps that I have done up till cmake.
conda create -n opticalflow python=3.6 anaconda
conda activate opticalflow
git clone https://github.com/Katou2/Optical_Flow_GPU_Opencv3
cd Optical_Flow_GPU_Opencv3
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -D BUILD_TIFF=ON ..
And this is the output that I get with no error.
-- version: 4.2.0
-- OPENCV include: /home/haziq/anaconda3/pkgs/libopencv-4.2.0-py36_3/include/opencv4
-- OPENCV libs dir:
-- OPENCV libs: opencv_calib3dopencv_coreopencv_dnnopencv_features2dopencv_flannopencv_gapiopencv_highguiopencv_imgcodecsopencv_imgprocopencv_mlopencv_objdetectopencv_photoopencv_stitchingopencv_videoopencv_videoioopencv_arucoopencv_bgsegmopencv_bioinspiredopencv_ccalibopencv_cvvopencv_datasetsopencv_dnn_objdetectopencv_dnn_superresopencv_dpmopencv_faceopencv_freetypeopencv_fuzzyopencv_hdfopencv_hfsopencv_img_hashopencv_line_descriptoropencv_optflowopencv_phase_unwrappingopencv_plotopencv_qualityopencv_regopencv_rgbdopencv_saliencyopencv_shapeopencv_stereoopencv_structured_lightopencv_superresopencv_surface_matchingopencv_textopencv_trackingopencv_videostabopencv_xfeatures2dopencv_ximgprocopencv_xobjdetectopencv_xphoto
-- Configuring done
-- Generating done
-- Build files have been written to: /home/haziq/Optical_Flow_GPU_Opencv3/build
The problem comes when I run make.
Scanning dependencies of target compute_flow_autogen
[ 25%] Automatic MOC for target compute_flow
[ 25%] Built target compute_flow_autogen
Scanning dependencies of target compute_flow
[ 50%] Building CXX object CMakeFiles/compute_flow.dir/compute_flow.o
/home/haziq/Optical_Flow_GPU_Opencv3/compute_flow.cpp:38:10: fatal error: opencv2/cudaoptflow.hpp: No such file or directory
#include "opencv2/cudaoptflow.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/compute_flow.dir/build.make:62: recipe for target 'CMakeFiles/compute_flow.dir/compute_flow.o' failed
make[2]: *** [CMakeFiles/compute_flow.dir/compute_flow.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/compute_flow.dir/all' failed
make[1]: *** [CMakeFiles/compute_flow.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
So the error mentions that the file opencv2/cudaoptflow.hpp is not found and I read through https://github.com/open-mmlab/mmaction/issues/39 says that the error is due to the opencv_contrib module not having been installed. However, I am certain that I already have opencv_contrib installed because I have this command executed.
pip install opencv-contrib-python
and have also verified it as I am able to call the cv2.xfeatures2d method which requires opencv_contrib to run.
import cv2
help(cv2.xfeatures2d) # cv2.xfeatures2d requires opencv_contrib

make: **all error 2 during opencv installation in ubuntu16.10

[ 8%] Generating test_precomp.hpp.gch/opencv_test_imgcodecs_Release.gch
In file included from /usr/include/c++/6/ext/string_conversions.h:41:0,
from /usr/include/c++/6/bits/basic_string.h:5402,
from /usr/include/c++/6/string:52,
from /home/vibha/OpenCV/modules/viz/include/opencv2/viz/types.hpp:49,
from /home/vibha/OpenCV/modules/viz/include/opencv2/viz/vizcore.hpp:49,
from /home/vibha/OpenCV/build/modules/viz/test_precomp.hpp:58:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^
compilation terminated.
modules/viz/CMakeFiles/pch_Generate_opencv_test_viz.dir/build.make:62: recipe for target 'modules/viz/test_precomp.hpp.gch/opencv_test_viz_Release.gch' failed
make[2]: *** [modules/viz/test_precomp.hpp.gch/opencv_test_viz_Release.gch] Error 1
CMakeFiles/Makefile2:3080: recipe for target 'modules/viz/CMakeFiles/pch_Generate_opencv_test_viz.dir/all' failed
make[1]: *** [modules/viz/CMakeFiles/pch_Generate_opencv_test_viz.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /usr/include/c++/6/ext/string_conversions.h:41:0,
from /usr/include/c++/6/bits/basic_string.h:5402,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/stdexcept:39,
from /usr/include/c++/6/array:39,
from /usr/include/c++/6/tuple:39,
from /usr/include/c++/6/bits/stl_map.h:63,
from /usr/include/c++/6/map:61,
from /home/vibha/OpenCV/build/modules/viz/precomp.hpp:49:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^
compilation terminated.
modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/build.make:62: recipe for target 'modules/viz/precomp.hpp.gch/opencv_viz_Release.gch' failed
make[2]: *** [modules/viz/precomp.hpp.gch/opencv_viz_Release.gch] Error 1
CMakeFiles/Makefile2:3186: recipe for target 'modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all' failed
make[1]: *** [modules/viz/CMakeFiles/pch_Generate_opencv_viz.dir/all] Error 2
[ 9%] Generating perf_precomp.hpp.gch/opencv_perf_imgcodecs_Release.gch
[ 9%] Built target pch_Generate_opencv_perf_imgcodecs
[ 9%] Built target pch_Generate_opencv_test_imgcodecs
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
I have installed build-essential package.
Also found stdlib.h present.
But still I am getting this error.
I am installing opencv 3.2 on ubuntu 16.10 from https://github.com/milq/milq/blob/master/scripts/bash/install-opencv.sh
I am new to linux, so please tell me if I am doing anything wrong.(I have followed all the instructions in the above site as it is..)
"You might have missed prerequisite for OpenCV 3.2.0"
[compiler] sudo apt-get install build-essential
[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
REFER:
Tutorial OpenCV Linux
linuxfromscratch opencv

OpenCV Ubuntu Installation Issues

I have been working on OpenCV installation from the last 4 days but still can't find a way to install it without errors.
collect2: error: ld returned 1 exit status
apps/visualisation/CMakeFiles/opencv_visualisation.dir/build.make:104: recipe for target 'bin/opencv_visualisation' failed
make[2]: *** [bin/opencv_visualisation] Error 1
CMakeFiles/Makefile2:7461: recipe for target 'apps/visualisation/CMakeFiles/opencv_visualisation.dir/all' failed
make[1]: *** [apps/visualisation/CMakeFiles/opencv_visualisation.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
It shouldn't be too difficult:
# Get all the up-to-date tools you'll need
sudo apt-get update
sudo apt-get install git cmake build-essential
# Get latest greatest OpenCV from GitHub
cd
git clone https://github.com/opencv/opencv.git
# Go build and install that puppy
cd opencv
mkdir build
cd build
cmake ..
make -j 8
sudo make install
Maybe try running the file from this link. The good thing about this is that it abstracts so many things from you. You need not manually run all the commands. Run it on the ubuntu terminal as bash install-opencv.sh.
Just let me know incase of any errors.

rbenv failing to install Ruby [duplicate]

I want to install gitlab, which don't recommend to use any ruby version manager.
But
This is my OS Linux dqa-dev 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux
linking shared-object psych.so
installing default psych libraries
make[2]: Leaving directory `/home/poc/ruby-2.0.0-p451/ext/psych'
make[2]: Entering directory `/home/poc/ruby-2.0.0-p451/ext/pty'
compiling pty.c
pty.c: In function 'chfunc':
pty.c:143:12: warning: ignoring return value of 'seteuid', declared with attribute warn_unused_result [-Wunused-result]
seteuid(getuid());
^
linking shared-object pty.so
installing default pty libraries
make[2]: Leaving directory `/home/poc/ruby-2.0.0-p451/ext/pty'
make[2]: Entering directory `/home/poc/ruby-2.0.0-p451/ext/racc/cparse'
compiling cparse.c
linking shared-object racc/cparse.so
installing default cparse libraries
make[2]: Leaving directory `/home/poc/ruby-2.0.0-p451/ext/racc/cparse'
make[2]: Entering directory `/home/poc/ruby-2.0.0-p451/ext/readline'
compiling readline.c
readline.c: In function 'Init_readline':
readline.c:1886:26: error: 'Function' undeclared (first use in this function)
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c:1886:26: note: each undeclared identifier is reported only once for each function it appears in
readline.c:1886:36: error: expected expression before ')' token
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c: At top level:
readline.c:530:1: warning: 'readline_pre_input_hook' defined but not used [-Wunused-function]
readline_pre_input_hook(void)
^
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory `/home/poc/ruby-2.0.0-p451/ext/readline'
make[1]: *** [ext/readline/all] Error 2
make[1]: Leaving directory `/home/poc/ruby-2.0.0-p451'
make: *** [build-ext] Error 2
I also have Ubuntu 14.04 and I got to make it work. Sharing what I did just in case it works for you.
I patched the file ext/readline/readline.c replacing line 1886:
rl_pre_input_hook = (Function *)readline_pre_input_hook;
With
rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
Then I tried to make it again and it worked.
Source: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741825
I also ran into this issue trying to install ruby-2.0.0-p247 with rbenv. Save some time by using this patch.
You can run it like this:
curl -fsSL https://gist.github.com/ference/d3d4cbbe18309a91ad9b/raw/267ea89fa145c536967831e1af4dea030297b53e/ruby-2.0.0-p247.patch | rbenv install --patch 2.0.0-p247
This is my solution on Ubuntu 14.04 Server edition.
I need to install underline
sudo apt-get install libreadline6 libreadline6-dev
Then, the problem was fixed.
Found a solution from https://github.com/sstephenson/ruby-build/issues/690. What actually missing is libffi-dev. I tried on Ubuntu 12.04 and it is successful.
sudo apt-get install libffi-dev

Troubles with wkhtmltopdf

Good day!, I hope someone has the answer to this question. I'm having troubles when trying to "convert" an html to pdf from a rails application, I've followed these steps: http://www.snikt.net/blog/2012/04/26/wicked-pdf/ with no luck, when I click the link it only changes the url from "http://localhost:3000/users/3" to "http://localhost:3000/users.3" with a blank page.
Then I read that you must configure a few things first, so I follow these steps: http://code.google.com/p/wkhtmltopdf/wiki/compilation, everything looks good until I reach the part with the "make && make install", here are the results:
cd src/lib/ && make -f Makefile
make[1]: Entering directory /home/username/wkhtmltopdf/src/lib'
make[1]: Nothing to be done forfirst'.
make[1]: Leaving directory /home/username/wkhtmltopdf/src/lib'
cd src/pdf/ && make -f Makefile
make[1]: Entering directory/home/username/wkhtmltopdf/src/pdf'
make[1]: Nothing to be done for first'.
make[1]: Leaving directory/home/username/wkhtmltopdf/src/pdf'
cd src/image/ && make -f Makefile
make[1]: Entering directory /home/username/wkhtmltopdf/src/image'
make[1]: Nothing to be done forfirst'.
make[1]: Leaving directory /home/username/wkhtmltopdf/src/image'
cd src/lib/ && make -f Makefile install
make[1]: Entering directory/home/username/wkhtmltopdf/src/lib'
mkdir: cannot create directory /include': Permission denied
make[1]: *** [install_headers] Error 1
make[1]: Leaving directory/home/username/wkhtmltopdf/src/lib'
make: * [sub-src-lib-install_subtargets-ordered] Error 2
As a note the command "wkhtmltopdf some_url my_pdf.pdf" does work, the issue is when trying to "convert" an html, from a rails application, to pdf.
I appreciate every single tip you can give because I'm trully lost. I'm sorry if it's a dumb question and for all the troubles, and thank you for your time.
Ok, just go through all of that, following this tutorial: http://blog.tcs.de/install-wkhtmltopdf-on-ubuntu-server/
Thank you guys for your time.

Resources