Unable to install rdkafka on Ubuntu 16.04 - apache-kafka

I want to install rdkafka
Upon running the command as per the instructions: sudo pecl install rdkafka
I have installed pecl using the command:
sudo apt-get install php-pear php-dev

Quick Install Steps:
Step 1 Install PHP pecl and pear commands:
sudo apt install php-pear
Step 2 Install librdkafka
sudo apt-get install -y librdkafka-dev
Step 3 Install PECL-package
sudo pecl install rdkafka
Step4 Enable PHP-extension in PHP config. Add to php.ini
extension=rdkafka.so
Step 4 Restart apache server
sudo service apache2 restart

Before doing that install librdkafka . linux command sudo apt-get install librdkafka . After that try the same command as you mentioned using pecl. Hope it should work.
For more detail use this link: https://arnaud-lb.github.io/php-rdkafka/phpdoc/book.rdkafka.html

Related

Try to install snapd but giving `conflicting requests` error

I am trying to install snapd but giving this error.
Operating System - Red Hat Enterprise Linux release 8.6 (Ootpa)
Error:
Problem: package snapd-2.57.6-2.el8.x86_64 requires snapd-selinux = 2.57.6-2.el8, but none of the providers can be installed
- conflicting requests
- nothing provides selinux-policy >= 3.14.3-108.el8 needed by snapd-selinux-2.57.6-2.el8.noarch
- nothing provides selinux-policy-base >= 3.14.3-108.el8 needed by snapd-selinux-2.57.6-2.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
I have the same problem. There's a long discussion about this here: https://forum.snapcraft.io/t/trouble-installing-snapd-on-rhel-8/13140/2. It looks like the only way to do it, if you can install all the necessary build tools, is to build from sources, as one of the posts there suggests.(I couldn't do it on my system because it's having subscription management issues.)
I also tried using CR repository, as suggested in the instructions for CentOS here: https://snapcraft.io/docs/installing-snap-on-centos, but that didn't work for me, either (I guess it's really just for CentOS and not RHEL).
UPDATE:
I finally found a solution (where there's a will...)! I manually installed all the requirements, one by one, that weren't available in the epel-release repo. My process was the following:
wget https://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/rpm-4.14.3-19.el8.x86_64.rpm
wget https://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/rpm-libs-4.14.3-19.el8.x86_64.rpm
wget https://dl.rockylinux.org/pub/rocky/8/BaseOS/aarch64/os/Packages/s/selinux-policy-3.14.3-108.el8.noarch.rpm
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/libsemanage-2.9-9.el8.x86_64.rpm --allowerasing -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/policycoreutils-2.9-19.el8.x86_64.rpm -y
sudo rpm -i --force rpm-4.14.3-19.el8.x86_64.rpm
sudo rpm -i --force rpm-libs-4.14.3-19.el8.x86_64.rpm
sudo rpm -i --force selinux-policy-3.14.3-108.el8.noarch.rpm
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/python3-libsemanage-2.9-9.el8.x86_64.rpm -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/python3-policycoreutils-2.9-19.el8.noarch.rpm -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/policycoreutils-python-utils-2.9-19.el8.noarch.rpm -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/selinux-policy-minimum-3.14.3-108.el8.noarch.rpm -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/libseccomp-2.5.2-1.el8.x86_64.rpm -y
sudo yum install https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/s/snapd-selinux-2.57.6-2.el8.noarch.rpm -y
sudo yum install snapd -y
sudo yum update snapd -y
It's conceivable that on your system something else will be missing. If you run into an error telling you that nothing provides package XYZ, you can find it here: https://centos.pkgs.org/8-stream/centos-baseos-x86_64/ and simply sudo yum install directly from the binary package URL; e.g.:
That's exactly what my process was, and here's what I have now:
$ cat /etc/redhat-release (base)
Red Hat Enterprise Linux release 8.2 (Ootpa)
$ snap --version (base)
snap 2.57.6-2.el8
snapd 2.52.1
series 16
rhel 8.2
kernel 4.18.0-193.6.3.el8_2.x86_64

Installing last libreoffice by apt-get

How to install the last LibreOffice version by the apt-get command? I ran the followed commands at a Ubuntu 16.04 and just got version 6.2.8.2 but the last official one is 6.4.
sudo apt-add-repository ppa:libreoffice/ppa
sudo apt update
sudo apt upgrade
sudo apt install libreoffice
Second the official developers, LibreOffice-official-version Ubuntu 16.04 should be 5.1.6~rc2-0ubuntu1~xenial10. Because I had manually added sudo apt-add-repository ppa:libreoffice/ppa I was able to got libreoffice 6.2.8.2.
To achieve the 6.4 and newer installation they recommend to download the package or simple use sudo snap install libreoffice.

The "SCRAM-SHA-1" authentication mechanism requires libmongoc built with --enable-ssl

Getting error message while connecting to database using Laravel 5.4 and Mongodb 3.6
The "SCRAM-SHA-1" authentication mechanism requires libmongoc built with --enable-ssl
Its running fine in ubuntu 16.04 with same versions, but not in AWS Linux.
Installed LAMP [ php70, apach24 ] :
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
Installed Mongodb [ 3.6 ] :
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-amazon/
Installed php-mongodb driver for php7:
sudo yum -y install php7-pear php70-devel gcc // completed
sudo pecl7 install mongodb // completed
sudo yum install openssl-devel // completed
php-mongodb driver installed and updated to php.ini, mongodb shows in phpinfo() as well.
we find there is libmongoc ssl disabled from phpinfo, Is that issue ?
How can we enable it ?
On Ubuntu 18.04 LTS, PHP 7.2.7
I had to install some extra packages:
sudo apt-get install -y libcurl4-openssl-dev pkg-config libssl-dev
Then re-install mongodb:
sudo pecl uninstall mongodb
sudo pecl install mongodb
Then check that SSL is enabled:
php -i | grep mongo
/etc/php/7.2/cli/conf.d/20-mongodb.ini,
mongodb
libmongoc bundled version => 1.11.0
libmongoc SSL => enabled
libmongoc SSL library => OpenSSL
libmongoc crypto => enabled
libmongoc crypto library => libcrypto
Restart php:
sudo service php7.2-fpm restart
Error, because of disabled libmongoc SSL and libmongoc Crypto from php-mongodb driver and enabled by following command.
sudo pecl7 config-set php_ini /etc/php.ini
After installing mongodb driver sudo pecl7 install mongodb, we should set the above.
now runs fine.
For those who have the error on an Alpine docker. You must add in your Dockerfile :
RUN apk add curl-dev openssl-dev
instead of sudo apt-get install -y libcurl4-openssl-dev pkg-config libssl-dev
I used RUN pecl config-set php_ini /etc/php.ini too
I get the same message using docker. I add to my Docker file
apt-get install -y libcurl4-openssl-dev pkg-config libssl-dev
and run
docker-compose up -d --build
Here is how I solved in CentOS 7
Remove mongodb extension:
pecl uninstall mongodb
Install openssl
sudo yum install openssl-devel
Reinstall MongoDB extension again
pecl install mongodb
On my Debian 9 module compillation fails with following error:
configure: error: OpenSSL libraries and development headers could not
be found
If you have same error try following:
apt-get remove libssl-dev
apt-get install libssl1.0-dev
As for me, this command does everything on Debian 9 and php 7.0
sudo apt-get install php-mongodb
Just restart Apache2 service afterwards

Remove grafana from ubuntu 17.10

I'm trying to un-install grafana 4.6.3 from Ubuntu 17.10, but is not possible. So far i have tried
sudo apt-get remove grafana , sudo apt-get remove --auto-remove grafana
and says Unable to locate package grafana.
Also tried to install it again from ubuntu software in order to unistall it properly but then pops me up an error message says: Unable to install grafana snap "graphana" is already installed. I installed it first time from ubuntu software.
What can i do to un-install it?
Have you tried dpkg?
sudo dpkg --remove --force-remove-reinstreq <packagename>
If apt won't remove it try using dpkg.
You could also try and clean up your apt utility.
sudo rm -rf /var/cache/apt/archives/<package_name.deb>
sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade

MongoDB - Ubuntu 15.04 missing packages

I've updated my Ubuntu 14.04 to the latest 15.04. Since then Mongo failed to run. can run the command mongo and it'll advise the version and so on but server will not run: sudo service mongod start as normal.
When I ran: sudo apt-get install -y mongodb-org it failed with the error in the screen shot below:
I completely purged mongo and re-installed, followed the instructions from here. However when I ran sudo apt-get update I noticed the below packages were 404'ing. See Screen shot below.
If anyone could shed any light on this would be great?
Following instructions from this page page http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
but with slighty changed second step 2. Create a list file for MongoDB:
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
I put trusty (code name for Ubuntu 14.04 LTS) instead of $(lsb_release -sc) which issues vivid as codename for 15.04
I see now that #Nail Lonergan already commented echo path change...
There is currently no build available for Ubuntu 15.04. Check this page for all builds: https://www.mongodb.org/downloads#development
After having heaps of issues, finally this is how I installed it,
Ubuntu 15.04
apt-get update
apt-get dist-upgrade
apt-get install -y mongodb
sudo apt-get install upstart-sysv
sudo service mongodb status
if not running
sudo service mongodb start
Install PHP Driver
sudo apt-get install php5-dev
sudo apt-get install build-essential
sudo pecl install mongo
https://sonnguyen.ws/install-mongodb-mongo-php-in-ubuntu/
sudo apt-get install mongodb
ps -ef|grep mongo
sudo pecl install mongo
sudo apt-get install php5-dev php5-cli php-pear