raspberry pi darkice Buffer overrun - streaming

I'm trying to do streaming with Darkice. The console shows:
root#raspberrypi:~# darkice
Using config file: /etc/darkice.cfg
Using ALSA DSP input device: hw:1,0
Using POSIX real-time scheduling, priority 98
Buffer overrun!
Buffer overrun!
...
Buffer overrun!
Buffer overrun!
DarkIce: AlsaDspSource.cpp:265: Input/output error [0]
root#raspberrypi:~#
I use:
Raspberry Pi B
Raspbian Soft-float Debian “wheezy” (I need use Java for other things)
Darkice 1.2
I compile source codes with this commands:
codec vorbis
cd /opt/
tar -zxvf libvorbis-1.3.3.tar.gz
tar -zxvf libogg-1.3.1.tar.gz
cd ./libogg-1.3.1/
./configure
make
make install
cd ../libvorbis-1.3.3
./configure
make
make install
codec aacplus
cd ..
tar -zxvf libaacplus-2.0.2.tar.gz
cd ./libaacplus-2.0.2/
apt-get install autoconf #I need the utility "autoconf" for the installation
apt-get install libtool #and the library "libtool"
./autogen.sh
./configure
make
make install
codec lame / mp3
cd ..
tar -zxvf lame-3.99.5.tar.gz
cd ./lame-3.99.5/
./configure
make
make install
this I'm not sure that I need
wget http://www.mega-nerd.com/SRC/libsamplerate-0.1.8.tar.gz
tar -zxvf darkice-1.2.tar.gz
cd ./libsamplerate-0.1.8
./configure
make
make check
make install
ldconfig -v
sndfile-resample
darkice
cd ..
tar -zxvf darkice-1.2.tar.gz
cd ./darkice-1.2/
apt-get install libasound2-dev
./configure --with-vorbis-prefix=/usr/local/lib/ --with-lame-prefix=/usr/local/lib/ --with-aacplus-prefix=/usr/local/lib/ --with-alsa-prefix=/usr/lib/arm-linux-gnueabi/ --with-samplerate-prefix=/usr/local/lib --with-jack-prefix=/usr/lib/arm-linux-gnueabi/
make
make install
The installation ends fine for all packages.
The params of de file: /etc/darkice.cfg are:
[general]
duration = 0
bufferSecs = 1
reconnect = yes
[input]
device= hw:1,0
sampleRate = 44100
bitsPerSample = 16
channel= 2
[shoutcast-0]
bitrateMode = cbr
bitrate = 56
format = mp3
quality = 1.0
...
The device hw:1,0 is correct, because when I use Audacity I record fine.
I followed this instruccions: http://www.t3node.com/blog/live-streami ... pberry-pi/
But the problem persists...
I saw other posts talking about this problem, but nothing helps me.
Any idea? What can I do?

Related

How to install/start using swtpm on Linux

I am trying to start using TPM on Linux, on my Raspberry Pi to be accurate, and the easiest would be to use swtpm to get used to commands and system, before using a TPM chip. I've tried the way presented on https://github.com/stefanberger/swtpm/wiki#compile-on-ubuntu-2104, but I got the error "Unable to locate libtpms-dev".
Then I looked for a way to install libtpms, and found this one solution. But after getting those both, I still couldn't run this command :
sudo swtpm socket --tpmstate dir=/home/ludovic.peyter/swtpm --tpm2 --server type=tcp,port=2321 --ctrl type=tcp,port=2322 --flags not-need-init,startup-clear
All I get is the following error :
swtpm: SWTPM_NVRAM_Lock_Dir: Could not open lockfile: No such file or directory
and
swtpm: Error: Could not initialize libtpms.
And here am I stuck, finding nothing to help me with this problem, or even an other way to avoid it.
Thanks for reading.
I have a complete solution, built with many different solutions and my own tests.
sudo apt -y install dpkg-dev debhelper libssl-dev libtool net-tools libfuse-dev libglib2.0-dev libgmp-dev expect libtasn1-dev socat python3-twisted gnutls-dev gnutls-bin libjson-glib-dev gawk git python3-setuptools softhsm2 libseccomp-dev automake autoconf libtool gcc build-essential libssl-dev dh-exec pkg-config dh-autoreconf libtool-bin tpm2-tools libtss0 libtss2-dev
Then make a new directory for more comfort, and step into it.
Clone git repository for libtpms :
git clone https://github.com/stefanberger/libtpms.git
Move to the generated libtpms directory and run these commands :
./autogen.sh -–with-openssl
make dist
dpkg-buildpackage -us -uc -j4
Then, as asked at the end of the last running command, run :
libtool --finish /usr/lib/aarch64-linux-gnu/
The directory could be different, so pay attention to the warning at the end of dpkg command.
And to finish the installation of libtpms :
sudo apt install ../libtpms*.deb
Now get back to the previous directory and clone swtpm git repository :
git clone https://github.com/stefanberger/swtpm.git
Now run this command :
dpkg-buildpackage -us -uc -j4
And the command asked by the previous running command :
libtool --finish /usr/lib/aarch64-linux-gnu/swtpm
The directory could be different, so pay attention to the warning at the end of dpkg command.
Now finish the installation with this :
sudo apt install ../swtpm*.deb
Everithing you need is installed. Now you need to modify the file ~/.profile or ~/.bash_profile to add this line :
export TPM2TOOLS_TCTI="swtpm:port=2321"
And now, everytime you need your swtpm, open two terminals, and in one of them run :
swtpm socket --tpmstate dir=<swtpm_path> --tpm2 --server type=tcp,port=2321 --ctrl type=tcp,port=2322 --flags not-need-init,startup-clear
In the other terminal, as long as the above command runs, you can run all your TPM commands.
Have you checked that the tpmstate directory exists? A mkdir /home/ludovic.peyter/swtpm2 could fix it for you.

ubuntu 16 install gstreamer but gstreamer-plugins-base-1.0.pc file is not found anywhere

(Using ubuntu 16 0n my mac pro.)
To integrate gstreamer and pocketsphinx, I need three .pc files as the offical website says:
gstreamer-1.0.pc
gstreamer-base-1.0.pc
gstreamer-plugins-base-1.0.pc
I start a new empty ubuntu 18.
install the gstreamer through
$ sudo apt-get install libgstreamer1.0-dev
But only two of the three important .pc files exist after the previous command.
If I cd to /usr/ and run :
sudo find . -print | grep -i 'gstreamer-plugins-base-1.0'
the terminal returns empty( not found).
At the same time,
sudo find . -print | grep -i 'gstreamer-base-1.0'
and
sudo find . -print | grep -i 'gstreamer-1.0'
will give me correct paths.
Where is the missing gstreamer-plugins-base-1.0.pc file? Thank you.
If there are only two but not three of the .pc files, the configuration of pocketsphinx will not work.
**sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev**
helped me generate the missing gstreamer-plugins-base-1.0.pc file.
Those two are needed.

Problems with LTTng-modules-2.8 on RaspberryPi

I'm using a RaspberryPi Zero W with Raspbian 4.9.80+ and I'm trying to install LTTng-modules-2.8 but when I type these commands
wget http://lttng.org/files/lttng-modules/lttng-modules-latest-
2.8.tar.bz2 &&
tar -xf lttng-modules-latest-2.8.tar.bz2 &&
cd lttng-modules-2.8.* &&
make &&
sudo make modules_install &&
sudo depmod -a
I receive this (after typing the command "make"):
make -C /lib/modules/4.9.80+/build M=/home/pi/lttng-modules-2.8.7
CONFIG_LTTNG=m
CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules
make[1]: *** /lib/modules/4.9.80+/build: No such file or directory. Stop.
Makefile:110: receipe for target 'modules' failed
make: *** [modules] Error 2
I downloaded the modules correctly but it seems that they are not there; how can I solve this problem?
Thanks, Ivan.
You need the kernel headers to build modules, according to raspbian's documentation they are provided by the raspberrypi-kernel-headers, you can install it with this command :
sudo apt-get install raspberrypi-kernel-headers
And then run the make commands.

unable to install haproxy 1.5 on centos 6.5

I am trying to install haproxy on my centos 6.5 server. I am using the command
yum install haproxy
This command installs a version 1.4.x. I have also looked at the following links, but could not get it to work
http://virtuallyhyper.com/2013/05/configure-haproxy-to-load-balance-sites-with-ssl/
http://blog.haproxy.com/2012/09/10/how-to-get-ssl-with-haproxy-getting-rid-of-stunnel-stud-nginx-or-pound/
https://github.com/bluerail/haproxy-centos
how do i install it?
You can build the RPM as follows:
mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
sudo yum -y install pcre-devel openssl-devel
cd rpmbuild/SOURCES
curl -L -O http://www.haproxy.org/download/1.5/src/haproxy-1.5.3.tar.gz
tar zxf haproxy-1.5.3.tar.gz
cd ..
cp -p SOURCES/haproxy-1.5.3/examples/haproxy.spec SPECS/haproxy153.spec
sed -i 's/Release: .*/Release: %{?_release:%{_release}}%{!?_release:1}/' SPECS/haproxy153.spec
sed -i 's/USE_PCRE=1 /USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 /' SPECS/haproxy153.spec
rpmbuild --define "_topdir `pwd`" --define "_release 2" -bb SPECS/haproxy153.spec
(I use a local directory and set the release number otherwise it is the same as http://qiita.com/uemura/items/e822c1ed505b9fe0208f)
Install
scp RPMS/x86_64/haproxy-1.5.3-2.x86_64.rpm root#somewhere:~/
somewhere# yum localinstall ~/haproxy-1.5.3-2.x86_64.rpm
You could install from source using one of these tar bundles:
http://www.haproxy.org/download/1.5/src/
You will probably need to install the following bundles to compile from source:
yum openssl-devel pcre-devel make gcc
Here's also a script which I presume would work on your environment

Install ack-grep on CentOS

I went through fair amount of google search to install ack-grep on CentOS but I didn't find anything help. I also looked for the source codes but couldn't find it neither. Does anyone know how to install it on the OS?
Thanks a lot.
Could be essentially the same as https://stackoverflow.com/a/23155007/35946 but on CentOS 6.7 the answer is:
# yum install epel-release
# yum install ack
if you don't have the root permission, you can do as follows:
$ curl https://beyondgrep.com/ack-2.22-single-file > ~/bin/ack && chmod 0755 !#:3
or you can change to root user:
$ sudo su
# curl https://beyondgrep.com/ack-2.22-single-file > /bin/ack && chmod 0755 !#:3
You can get it from the EPEL software repository.
From the EPEL FAQ:
For EL5:
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
...
su -c 'yum install ack'
For EL6:
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
...
su -c 'yum install ack'
Go to Beyond Grep and look at the section titled
Install The ack executeable
curl http://beyondgrep.com/ack-2.14-single-file > ~/bin/ack && chmod 0755 !#:3
And replace ack.2.14 with the current version of ack.
You may need to create the directory mkdir ~/bin/ first. You may
also need to modify ~/.bashrc to include this new path E.G.:
PATH=$PATH:$HOME/bin
Then reload ~/.bashrc
source ~/.bashrc
Test the installation by running ack:
rpm -qa | ack s
This should display any installed packages containing the letter s. (some linux distributions may use ack-grep as the command.
How did you try installing it? Are you using yum? The package is probably not called "ack-grep", but just "ack".
The name "ack-grep" is a Debian-specific thing because there was already a package called "ack", so they called it "ack-grep" instead. That was years ago and now they're dropping the original "ack" package and renaming "ack-grep" to "ack".
For RedHat Enterprise just do sudo yum install ack