Trying to install TA-lib - linux

I'm using gcp debian VM, and trying to install the module TA-lib doing this (with the tar already downloaded):
$ tar -xzf ta-lib-0.4.0-src.tar.gz
$ cd ta-lib/
$ ./configure --prefix=/usr DOING THIS I GET AN ERROR
$ make
$ sudo make install
configure: error: no acceptable C compiler found in $PATH
How can I solve?

Related

Trying to jail linux users using bubblewrap on ubuntu 18.04

I ran the below commands as root to install bubblewrap:
$ apt install pkg-config libcap-dev automake
$ git clone https://github.com/containers/bubblewrap.git
$ cd bubblewrap
$ git checkout v0.4.1
$ ./autogen.sh
$ make
$ make install
$ ln -s /usr/local/bin/bwrap /bin/bwrap
$ mv /usr/bin/bwrap /usr/bin/bwrap.dist
$ ln -s /usr/local/bin/bwrap /usr/bin/bwrap
It got installed. Now I want to jail/unjail some already created users using bubblewrap. I am not able to find any commands to do so. I want to know how to jail/unjail users using bubblewrap(bwrap).

pkg-config not found when install bluez-alsa

I am trying to install bluez-alsa with:
../configure --enable-aac --enable-ofono --enable-debug
and I am getting the following error:
configure: error: pkg-config is required. See pkg-config.freedesktop.org
I tried installing pkg-config with:
sudo apt-get install pkg-config
as well as with a manual installation:
curl https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.tar.gz -o pkgconfig.tgz
tar -zxf pkgconfig.tgz && cd pkg-config-0.29
./configure && sudo make install
but nothing seems to work. Do I need to set some paths for the configure script?

how to install gcc-12 on ubuntu

$ sudo apt search gcc-12
Sorting... Done
Full Text Search... Done
$ uname -a
Linux Han 5.10.81.1-microsoft-standard-WSL2 #1 SMP Mon Nov 22 18:52:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
I am using the default sources.list file, I want to install gcc-12 but I can't find it in the mirror source, what should I do!
gcc-12 is not available in ubuntu 20.04, so we need to compile it from source code, here are the steps which I borrowed from this video:
Step 1: clone gcc source code and checkout gcc-12 branch
$ git clone https://gcc.gnu.org/git/gcc.git gcc-source
$ cd gcc-source/
$ git branch -a
$ git checkout remotes/origin/releases/gcc-12
Step 2: make another build dir
Note this is important as running ./configure from within the source directory is not supported as documented here.
$ mkdir ../gcc-12-build
$ cd ../gcc-12-build/
$ ./../gcc-source/configure --prefix=$HOME/install/gcc-12 --enable-languages=c,c++
Step 3: installing GCC prequisites and run configure again
The missing libraries will be shown in above ./confgiure output, search and install them one by one.
$ apt-cache search MPFR
$ sudo apt-get install libmpfrc++-dev
$ apt-cache search MPC | grep dev
$ sudo apt-get install libmpc-dev
$ apt-cache search GMP | grep dev
$ sudo apt-get install libgmp-dev
$ sudo apt-get install gcc-multilib
$ ./../gcc-source/configure --prefix=$HOME/install/gcc-12 --enable-languages=c,c++
An alternartive is to run the download_prerequisites script.
$ cd ../
$ cd gcc-source/
$ ./contrib/download_prerequisites
$ ./../gcc-source/configure --prefix=$HOME/install/gcc-12 --enable-languages=c,c++
Step 4: compile gcc-12
$ make -j16
Still flex is missing:
$ sudo apt-get install flex
$ ./../gcc-source/configure --prefix=$HOME/install/gcc-12 --enable-languages=c,c++
$ make -j16
$ make install
Another way is to use Ubuntu 22.04 where gcc-12 is available. In Ubuntu 22.04, gcc-12 can be installed with apt:
$ sudo apt install gcc-12
You can use Homebrew to install pre-built binaries.
Follow instructions to install Homebrew at https://brew.sh/, then
brew install gcc for default GCC (currently 11) or brew install gcc#12 for gcc-12.
Note that it may compile missing dependencies.
I would add if you are adding for 64 bit only, you'll want to add "--disable=multilib" to the end of your configure statement.

Python3.8 on Ubuntu 14.04

I am trying to install Python3.8 on Ubuntu 14.04, I get this error:
E: Unable to locate package python3.8 E: Couldn't find any package by
regex 'python3.8'
Is it even possible to have python3.8 on Ubuntu that is that old? If it is possible, please tell me how.
EDIT
When installing from source ( I followed that instruction)
I get this error:
Fatal Python error: _PySys_InitCore: can't initialize sys module
Python runtime state: preinitialized
Current thread 0x00002ab78e1b3740 (most recent call first): generate-posix-vars failed make: *** [pybuilddir.txt] Error 1
An alternative solution could be to compile python statically on a newer system. Then such binaries can be transferred to the target system.
Compilation tested on vanilla Ubuntu 20.04 LTS
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
$ sudo apt-get install build-essential checkinstall
$ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
$ wget https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tgz
$ tar xzf Python-3.8.6.tgz
$ cd Python-3.8.6
$ ./configure LDFLAGS="-static" --disable-shared
$ make LDFLAGS="-static" LINKFORSHARED=" "
....
$ cd ..
$ zip -r Python-3.8.6.zip Python-3.8.6
Transfer Python-3.8.6.zip to target sysytem
$ unzip Python-3.8.6.zip
$ cd Python-3.8.6
$ ./python
Of course you would have to do
make install
or clean this folder, that's your choice.
Normally, as long as you are not using any kind of dockerization/paravirtualization, simple:
sudo snap install python38
should work.

how to solve the libgnutls.so.28 issue?

yum install autoconf automake gcc
libtasn1-devel zlib zlib-devel trousers
trousers-devel gmp-devel gmp xz texinfo
libnl-devel libnl tcp_wrappers-libs
tcp_wrappers-devel tcp_wrappers dbus
dbus-devel ncurses-devel pam-devel
readline-devel bison bison-devel flex
gcc automake autoconf wget
Install Nettle:
wget http://www.lysator.liu.se/~nisse/archive/nettle-2.7.tar.gz
tar xvf nettle-2.7.tar.gz
cd nettle-2.7
./configure --prefix=/opt/
make && make install
cd ..
Install the latest GnuTLS, this version comes with a fix of security flaw:
wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.12.tar.xz
tar xvf gnutls-3.2.12.tar.xz
cd gnutls-3.2.12
export LD_LIBRARY_PATH=/opt/lib/:/opt/lib64/
NETTLE_CFLAGS="-I/opt/include/" NETTLE_LIBS="-L/opt/lib64/ -lnettle" HOGWEED_CFLAGS="-I/opt/include" HOGWEED_LIBS="-L/opt/lib64/ -lhogweed"
./configure --prefix=/opt/
make && make install
cd ..
Install the Latest LibNL:
wget http://www.carisma.slowglass.com/~tgr/libnl/files/libnl-3.2.24.tar.gz
tar xvf libnl-3.2.24.tar.gz
cd libnl-3.2.24
./configure --prefix=/opt/
make && make install
cd ..
Install Ocserv
The latest version of ocserv is 0.8.0[1], if you want a git version, you might need to compile a recent version of automake and autoconf.
wget ftp://ftp.infradead.org/pub/ocserv/ocserv-0.8.0.tar.xz
tar xvf ocserv-0.8.0.tar.xz
cd ocserv-0.8.0
export LIBGNUTLS_CFLAGS="-I/opt/include/" LIBGNUTLS_LIBS="-L/opt/lib/ -lgnutls" LIBNL3_CFLAGS="-I/opt/include" LIBNL3_LIBS="-L/opt/lib/ -lnl-3 -lnl-route-3"
./configure --prefix=/opt/
make && make install
When I run certtool --generate-privkey --outfile ca-key.pem , I encounter the following error:
[root#arx ~]# certtool --generate-privkey --outfile ca-key.pem
certtool: relocation error: certtool: symbol gnutls_srp_3072_group_prime, version GNUTLS_3_0_0 not defined in file libgnutls.so.28 with link time reference
[root#arx ~]#
How to fix the error?
Thanks.
PS: the os in my linux vps is centos 7. In centos 6, I didn't encounter the error above.

Resources