I am following janus documentation to build a video mcu system. I installed all the dependencies of it according to the read me file.
http://janus.conf.meetecho.com/docs/
after that when I run the script using sh install.sh I am getting following error
In file included from test.c:1:0:
../websock/src/websock.h:55:26: fatal error: event2/event.h: No such file or directory
#include <event2/event.h>
^
compilation terminated.
make[1]: *** [test.o] Error 1
make[1]: Leaving directory `/home/gayan/MyDetails/MyApplications/virtualClassRoomTest/janus-gateway/wstest'
make: *** [wstest] Error 2
The installer couldn't find the libwebsock lib, which is needed for WebSockets
You can install version 1.0.4 (required!) with the following steps:
wget http://paydensutherland.com/libwebsock-1.0.4.tar.gz
tar xfv libwebsock-1.0.4.tar.gz
cd libwebsock-1.0.4
./configure --prefix=/usr && make && sudo make install
[Note: you may need to pass --libdir=/usr/lib64 to the configure script if you're installing on a x86_64 distribution]
If you're not interested in WebSockets support, you can disable them passing nowebsockets to the install script:
./install.sh nowebsockets
I also install the libwebsock according to the above steps, but still the error is showing. event2 directory is not in the janus-gateway codes. here is the github link for all the source code. https://github.com/meetecho/janus-gateway.git
Any kind of help would be appreciated.
The full installation steps to have websockets working(Ubuntu 14) are:
mkdir -p ~/build
sudo apt-get install libmicrohttpd-dev libjansson-dev libnice-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libini-config-dev libcollection-dev libwebsockets-dev pkg-config gengetopt automake libtool doxygen graphviz git cmake
sudo apt-get install libavformat-dev
echo "Start installing libwebsockets"
cd ~/build
git clone git://git.libwebsockets.org/libwebsockets
cd libwebsockets
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT=ON ..
make && sudo make install
echo "Start installing Janus"
cd ~/build
git clone git://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --disable-data-channels --disable-rabbitmq --disable-docs --prefix=/opt/janus LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" CFLAGS="-I/usr/local/include"
make && sudo make install
sudo make configs
Make sure to copy certificates if using wss, chrome is really picky about that stuff. If using self signed certificates you have to trust them in chrome(very intuitive procedure:)))
sudo cp mycert.pem /opt/janus/share/janus/certs/
sudo cp mycert.key /opt/janus/share/janus/certs/
I had this problem and solve it after
sudo apt-get install libevent-dev
My system is ubuntu 14.04 64 bit
Related
httpd build on msys2 fails with the following error:
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
On real linux distros, installing the expat-devel package seems to solve the problem see here,
more precisely, expat-devel is an apr-util prerequisite
and at least its headers ar missing on msys2.
So how to build httpd with msys since no expat-devel package or headers is available ?
When configuring httpd --with-included-apr, where do apr-utils look for expat headers or how to configure that ?
more precisely the CHANGES-APR-UTIL-1.6 documentation says
Changes with APR-util 1.6.0
*) The expat dependency of apr-util is no longer built with
apr-util.
Install expat (including development headers and libraries) first
before building apr-util.
where should expat headers and libs be installed in httpds build directory tree ?
I finally had to build expat separately,
then other errors arised and found a solution thanks to
this link for missing libtool and to that link for the effective way to build expat without generating export redefinition.
let find the full build script here:
pacman -S make gcc libcrypt perl unzip libtool msys/libcrypt-devel
cd OpenSSL_1_1_1-stable
curl http://mirrors.standaloneinstaller.com/apache/httpd/httpd-2.4.38.tar.gz --output httpd-2.4.38.tar.gz
tar xvf httpd-2.4.38.tar.gz
cd $HOME
git clone --branch OpenSSL_1_1_1-stable https://github.com/openssl/openssl.git
mv openssl OpenSSL_1_1_1-stable
cd OpenSSL_1_1_1-stable
./configure gcc --prefix=$HOME/openssl
make
make install
cd $HOME
wget https://github.com/libexpat/libexpat/releases/download/R_2_2_6/expat-2.2.6.tar.bz2
tar xjvf expat-2.2.6.tar.bz2
cd $HOME/expat-2.2.6
./configure --prefix=$HOME/httpd --exec-prefix=$HOME/httpd
make
make install
cd $HOME
curl http://mirrors.standaloneinstaller.com/apache//apr/apr-1.6.5.tar.gz --output apr-1.6.5.tar.gz
tar xvf apr-1.6.5.tar.gz
curl http://mirrors.standaloneinstaller.com/apache//apr/apr-util-1.6.1.tar.gz --output apr-util-1.6.1.tar.gz
tar xvf apr-util-1.6.1.tar.gz
cd $HOME/apr-1.6.5
./configure --prefix=$HOME/httpd
make
make install
cd $HOME/apr-util-1.6.1
./configure --prefix=$HOME/httpd --with-apr=$HOME/httpd --with-expat=$HOME/httpd
make
make install
cd $HOME
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
tar xvf pcre-8.43.tar.gz
cd pcre-8.43
./configure --prefix=$HOME/pcre
make
make install
cd $HOME
wget https://github.com/nghttp2/nghttp2/releases/download/v1.37.0/nghttp2-1.37.0.tar.gz
tar xvf nghttp2-1.37.0.tar.gz
cd $HOME/nghttp2-1.37.0
./configure --exec-prefix=$HOME/httpd --prefix=$HOME/httpd
make
make install
cd $HOME/httpd-2.4.38
./configure --prefix=$HOME/httpd --with-expat==$HOME/httpd --with-apr-util=$HOME/httpd --with-apr=$HOME/httpd --with-pcre=$HOME/pcre --enable-ssl --enable-ssl-staticlib-deps --with-ssl=$HOME/openssl --enable-proxy --enable-proxy-connect --enable-proxy-http --enable-proxy-balancer --enable-http2 --enable-nghttp2-staticlib-deps --with-nghttp2=$HOME/nghttp2
make
make install
The build process completed successfully,
but usefull to say that the runtime can't be used since httpd is not able to load its dynamic modules as described here
(edited for clarity - rolled in accepted answer)
Libsodium has been prepped for PHP 7. In doing this, the namespace was removed and a prefix of sodium_ for methods and SODIUM_ for constants was added. Also the version methods were removed.
This github page documents all the new functions and constants and the project provides backward compatibility with the \Sodium namespace: https://github.com/Firehed/sodium/blob/master/src/we_cant_have_nice_things.php
Recipe: install Libsodium on PHP 7 on and AWS AMI
# PHP 7.0 Libsodium install AWS AMI
yum install -y php7-pear re2c php70-devel
yum groupinstall -y "Development Tools"
pecl7 install libsodium
vi /etc/php-7.0.d/20-libsodium.ini
; Enable libsodium extension module
extension=sodium.so
service httpd restart
command line test to verify sodium is installed
php7 --info | grep sodium
test php function to verify calling pattern for password hash
<?php
$password = "hello";
$hash_str = sodium_crypto_pwhash_str(
$password,
\SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE,
\SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE
);
var_dump($password, $hash_str);
Thanks to #GracefulRestart for the help.
I see a couple problems here, the first is that your test file appears to be non-functional.
Running your test code with libsodium working in PHP 7 returns the following error:
PHP Fatal error: Uncaught Error: Call to undefined function Sodium\\library_version_major()
If you want to check the version, it may be easier to search the data from the phpinfo() function:
<?php phpinfo(); ?>
# or from CLI
php7 --info |grep sodium
The other problem I notice is in your install steps, you install libsodium both from source and from PECL. The make install command by default places the libraries in /usr/local/lib, while pecl7 install libsodium will normally install libraries into the default PHP modules directory.
If you were attempting to install from source, your /etc/php-7.0.d/20-libsodium.ini file is incorrect as that is loading the libsodium libraries you installed from PECL (you can check which directory it is loading from by check the extension_dir ini setting from phpinfo()).
If you only need to install from PECL, you do not need all of the development packages or any manual compiling.
EDIT I modified your posted recipe to remove the extraneous steps of downloading the source and just do everything with PECL:
yum install -y php7-pear re2c php70-devel
yum groupinstall -y "Development Tools"
# PHP 7.0
pecl7 install libsodium
vi /etc/php-7.0.d/20-libsodium.ini
; Enable libsodium extension module
extension=sodium.so
service httpd restart
If the YUM repositories for your distribution offer the php7-libsodium package, that would be an even smaller recipe
Hope that helps
Here's my solution to this recipe.
wget -c https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz
tar -xvf libsodium-1.0.18.tar.gz
cd libsodium-1.0.18
./configure
make && make check
make install
sudo pecl7 install -f libsodium
pecl7 should install and modify the php.ini file to include the following in the php.ini
extension="sodium.so"
If you running PHP in Elastic Beanstalk, the following file ./ebextentions/script.config :
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/001_libsodium.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
wget -c https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz && tar -xvf libsodium-1.0.18.tar.gz && cd libsodium-1.0.18 && ./configure && make && make check && sudo make install && sudo pecl7 install -f libsodium
Redis installation on RHEL fails when running make command. Below is the output
cd src && make all
make[1]: Entering directory `/root/Downloads/redis-3.2.0/src'
CC adlist.o
In file included from adlist.c:34:
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/root/Downloads/redis-3.2.0/src'
make: *** [all] Error 2
running
make distclean
and then
make
solved the issue
It happen due to gcc compiler not available in machine. first install gcc:
$ sudo apt install gcc
then try
make
sure it'll resolve this issue . I tried on ubuntu 18.04.
Redis creates the redis-server and redis-cli files only after the Dependenices in the /deps directory: hiredis lua jemalloc linenoise are resolved.
I had to run the make command in the deps directory more than once to get the depenedencies resolved.
The following are the Steps I followed:
cd <redisInstallationPath> (I have it under /opt/mount1/redis-3.0.7)
make distclean
cd deps/
Resolve dependecies more than once.
make lua hiredis linenoise
make jemalloc
make hiredis
make linenoise
Did the same again as there were a few missing files. I think you just need to get the combination correct. Run the make command more than once till you get it right.
make hiredis lua jemalloc linenoise
make hiredis
make lua
make jemalloc
make linenoise
cd /opt/mount1/redis-3.0.7/
make
-> I got some errors here that the file hiredis/libhiredis.a is not found and hence I continued again to resolve dependecies.
cd deps
make jemalloc
make hiredis
ll hiredis/libhiredis.a -> yields a file
cd /opt/mount1/redis-3.0.7/
make
Now I get the following output:
cd src && make all
make[1]: Entering directory `/opt/mount1/redis-3.0.7/src'
LINK redis-server
INSTALL redis-sentinel
CC redis-cli.o
LINK redis-cli
CC redis-benchmark.o
LINK redis-benchmark
CC redis-check-dump.o
LINK redis-check-dump
CC redis-check-aof.o
LINK redis-check-aof
Hint: It's a good idea to run 'make test' ;)
make[1]: Leaving directory `/opt/mount1/redis-3.0.7/src'
You can go to Redis installation path (in my case: /opt/mount1/redis-3.0.7 directory) to start the Server.
src/redis-server
And in another terminal run 'redis-cli' to connect to the Redis Server.
src/redis-cli
Example:
127.0.0.1:6379> incr counter
(integer) 1
127.0.0.1:6379> get counter
"1"
127.0.0.1:6379> exit
I got a solution to my problem through this article http://michael.otacoo.com/redis/redis-first-steps-fetch-install-and-server-creation/
Ditch the OS based installation, tried multiple solutions some dependency was always failing
Node to the rescue
There are other ways to install Node and NPM below steps is using Yum on Centos / RHEL
# Add NodeSource yum repository
curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash -
# Additional dependencies if required
yum install gcc-c++ make -y
# Install Node.js and npm
yum install nodejs -y
# install redis-cli
npm install -g redis-cli
# connect to redis endpoint
rdcli -h redis.host
# or
rdcli -h redis.host -a redis.password -p 1111
once connected run
PING
response should be
PONG
to validate the connectivity
cache.amazonaws.com:6379> PING
PONG
In linux
May be some of the files required are missing which can be installed with libc6-dev package.
This worked for me:-
Go to your redis directory and run the following in your terminal:-
sudo apt-get install libc6-dev
make distclean && make
That shouldn't be happening. One possible reason could be that your make tools are way older than current version. To update them run:
yum install make gcc gcc-c++ kernel-devel
This will install minimum packages, but if even that doesn't solves the problem, try installing the complete group:
yum install make gcc gcc-c++ kernel-devel
Read More: https://superuser.com/questions/151557/what-are-build-essential-build-dep
I guess the version 3.2.0 lost some files because I have met the same problem as you, I solved it by downloading another redis version 3.0.7, the download link is
http://download.redis.io/releases/redis-3.0.7.tar.gz
Then, decompress the file and run the command as you have done before, just step into the redis directory and type the command 'make'
Good luck with you
This error may indicate that you need to run make with sudo: sudo make
You may afterwards run into:
../deps/jemalloc/lib/libjemalloc.a(nstime.o): In function nstime_get': /opt/redis_src/current/redis-stable/deps/jemalloc/src/nstime.c:120: undefined reference toclock_gettime'
If so, please see:
https://github.com/antirez/redis/issues/3790
on centos
yum install gcc glibc
tar zxvf redis-5.0.3.tar.gz
cd redis-5.0.3
cd deps
make hiredis jemalloc linenoise lua geohash-int
cd ..
make install
cd utils
./install_server.sh
extra tips
To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128
You should use Ubuntu PPA
$ sudo add-apt-repository ppa:redislabs/redis
$ sudo apt-get update
$ sudo apt-get install redis
I'm just finished installing Ubuntu 13.10.
I want try Phalcon, and when I build the source (phalcon.so), I have this error :
from /home/fabrice/Downloads/cphalcon/build/32bits/phalcon.c:204:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
#include "pcre.h"
^
compilation terminated.
make: *** [phalcon.lo] Erreur 1
My installation of lamp is :
sudo apt-get install -y apache2 php5 mysql-server libapache2-mod-php5
php5-mysql php5-curl php5-imagick php5-mcrypt php5-memcache
php5-sqlite php5-xdebug php-apc php5-intl php-mongo php5-dev gcc
Can anybody help me ?
The latest version of Phalcon uses PCRE libraries.
You can install them like so:
sudo apt-get install libpcre3-dev
and then try and install Phalcon again
For CentOS you will need to use
sudo yum install pcre-devel
Credits: #xgretsch
For Mac you can use
brew install pcre
Credits #Brandon Romano
For Mac without brew
Go to https://www.pcre.org/ and download latest pcre:,
tar -xzvf pcre-8.42.tar.gz
cd pcre-8.42
./configure --prefix=/usr/local/pcre-8.42
make
make install
ln -s /usr/local/pcre-8.42 /usr/sbin/pcre
ln -s /usr/local/pcre-8.42/include/pcre.h /usr/include/pcre.h
Credits #user1377324
For mac osx maverick you can use
brew install pcre
if it gives you error, you can use
sudo ln -s /opt/local/include/pcre.h /usr/include/
sudo pecl install apc
I have installed pcre via homebrew in Big Sur, so linked as:
sudo ln -s /opt/homebrew/include/pcre2.h /usr/local/include/
To include pcre.h file, search the package archives for the pcre.h file.
To do this I use a command called apt-file (
apt-get install apt-file
and
apt-file update
if you donβt have it installed).
Then search for the pcre package:
apt-file search -x "/pcre.h$"
The -x informs the command that I want to use a regular expression as the pattern. apt-file provided me with three hits:
kannel-dev: /usr/include/kannel/gwlib/pcre.h
libajax6-dev: /usr/include/ajax/pcre.h
libpcre3-dev: /usr/include/pcre.h
The last one is the one I want:
apt-get install libpcre3-dev
This will solve the problem with pcre.h file compilation problem. Hope it will help others, who may come to find an answer to this thread.
For MacOS monterey amd64 (darwin), it is necessary to create a symlink.
First, locate where the pcre.h was installed by Brew:
$ brew list pcre | grep 'pcre\.h$'
/opt/homebrew/Cellar/pcre/8.45/include/pcre.h
Then, gets the directory that GCC is looking for header (.h) files:
$ cpp -v
...
#include <...> search starts here:
/Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/usr/include # <---- we are going to use this one
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
Finally, create a symlink to the pcre.h file, so that GCC will find it in its search path:
ln -s /opt/homebrew/Cellar/pcre/8.45/include/pcre.h \
/Library/Developer/CommandLineTools/usr/include/pcre.h
To test if it worked, we can use the following C code:
#include <stdio.h>
#include <pcre.h>
int main() {
printf("lala popo");
return 0;
}
And run:
gcc test.c -o test
ππππππ
Using macOS Monterey 12.6 on an M1 Pro MacBook Pro, here are the steps necessary to install outh extension for PHP 8.1 using brew:
brew install pcre
brew install pcre2
sudo ln -s /opt/homebrew/include/pcre.h /usr/local/include/
sudo ln -s /opt/homebrew/include/pcre2.h /usr/local/include/
sudo pecl install oauth
Port does not support installing valgrind on the latest mac os. And I could not compile it from source code. I am wondering if someone has installed it on mac os 10.9. Here is the error message I got:
./autogen.sh
running: aclocal
running: autoheader
autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
error: while running 'autoheader'
I installed it from a patched branch here, this is how my installation worked, try following the steps::
//Make sure you have autoconf and automake both are installed.
sudo port -v install automake
sudo port -v install autoconf
//get patched valgrind on "homebrew" branch
cd ~/some_directory
git clone https://github.com/fredericgermain/valgrind/ -b homebrew
cd valgrind
//clone it
git submodule init
git submodule update
//compile valgrind
./autogen.sh
./configure
make
sudo make install
//confirm installation
calvin % which valgrind