this is what i get:
bitnami#ip-10-117-57-211:/bin$ sudo pecl install mongo
downloading mongo-1.4.0.tgz ...
Starting to download mongo-1.4.0.tgz (138,495 bytes)
..............................done: 138,495 bytes
84 source files, building
WARNING: php_bin /opt/bitnami/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Can't load '/opt/bitnami/perl/lib/5.8.8/i686-linux/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /opt/bitnami/perl/lib/5.8.8/i686-linux/auto/Data/Dumper/Dumper.so: undefined symbol: PL_sv_undef at /opt/bitnami/perl/lib/5.8.8/i686-linux/XSLoader.pm line 70.
at /opt/bitnami/perl/lib/5.8.8/i686-linux/Data/Dumper.pm line 36
Compilation failed in require at /usr/share/autoconf/Autom4te/C4che.pm line 33.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/C4che.pm line 33.
Compilation failed in require at /usr/bin/autom4te line 38.
BEGIN failed--compilation aborted at /usr/bin/autom4te line 38.
ERROR: `phpize' failed
Any ideas how to fix?
Try configuring manually as it seems bitnami is a bit funky:
$ sudo apt-get update
$ sudo apt-get install build-essential libtool autoconf unzip wget
Download the latest source code from the web page, uncompress it and compile the module.
$ wget http://pecl.php.net/get/mongo-1.4.3.tgz
$ tar -zxf mongo*
$ export PHP_AUTOCONF=/usr/bin/autoconf
$ export PHP_PREFIX=/opt/bitnami/php
$ cd mongo-*
$ /opt/bitnami/php/bin/phpize
$ ./configure
$ make
$ sudo make install
Adapted from: http://wiki.bitnami.com/Components/PHP#How_to_install_OAuth_module.3f
well i finally got it working. I ran through the steps to install mongo extension on mac server and it worked for my bitnami lamp stack.
The instructions were on this blog:
http://andres.jaimes.net/857/setup-php-mongo-on-mac/
Related
If I run in an ubuntu:20.04 docker image (docker run -it --rm ubuntu:20.04 bash) the following commands:
apt update
apt upgrade -y
apt install -y wget
wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Linux-x86_64.sh
bash Miniconda3-py310_23.1.0-1-Linux-x86_64.sh
source /root/.bashrc
export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH
then it breaks libp11-kit. For instance when running apt install vim:
/usr/lib/apt/methods/http: symbol lookup error: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined symbol: ffi_type_pointer, version LIBFFI_BASE_7.0
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
I tried to add other directories to LD_LIBRARY_PATH (/usr/lib/, /lib/x86_64-linux-gnu/) without result.
Possibly related to conda-build fails to recognise libraries?
I have created a simple RPM on Fedora27 and it worked fine. It just copied files from tar.gz to /usr/bin/.
When I tried to install this RPM on CentOS I got:
# rpm -i RPMS/x86_64/my_rpm-0.0-5.x86_64.rpm --force
error: Failed dependencies:
libc.so.6(GLIBC_2.26)(64bit) is needed by my_rpm-0.0-5.x86_64
So I assumed I will need to create the RPM on CentOS.
But when I do so I get a weird: 'No such file or directory' that I don't get on Fedora27. Here is a sketch of my spec file:
%define _topdir %(pwd)
%define name my_rpm
%define release 5
%define version 0.0
%define buildroot %{_topdir}/%{name}-%{release}-root
BuildRoot: %{buildroot}
Summary: my_rpm
License: -
Name: %{name}
Release: %{release}
Version: %{version}
Source: %{name}-%{version}-%{release}.tar.gz
Prefix: /usr
Group: Tools
%description
This is my_rpm spec file
%prep
%setup -q -n %(arch)/%{name}-%{version}
%install
install -D my_app -t %{buildroot}/usr/bin/my_rpm/
%files
/usr/bin/my_rpm/*
When I try to build the RPM for it I get:
# rpmbuild -v -bb --clean SPECS/bpf.spec
+ install -D app -t /root/rpmbuild/BUILDROOT/my_rpm-0.0-5.x86_64/usr/bin/my_rpm/
install: failed to access '/root/rpmbuild/BUILDROOT/my_rpm-0.0-5.x86_64/usr/bin/my_rpm/': No such file or directory
The same SPEC exactly runs smoothly on Fedora27.
What should I change in it my spec file so that it would work both on Fedora27 and CentOS7? or maybe I can fix my initial problem with Glibc?
EDIT 1
I added the "mkdir -p ..." command under install and the build was successful but it still gives me the same error, that I need Glibc 2.6.
What I don't understand is why during the build it says:
Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.26)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.7)(64bit) libc.so.6(GLIBC_2.9)(64bit) libelf.so.1()(64bit) libelf.so.1(ELFUTILS_1.0)(64bit) rtld(GNU_HASH)
Edit 2(solution)
I got it to work. My executables are compiled C code. So I had to re-compile everything on CentOS and then build the rpm. Now it works on both Fedora and CentOS.
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
I have already installed GD.pm. I want to make sure it supports PNG.
So to check that I do this:
$ perl -e 'use GD; $im=GD::Image->new(); print $im->can("png") ? "yes" : "no" , "\n";'
no
As you see. It prints no.
Then I download the latest GD from CPAN with the following process:
> wget http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.53.tar.gz
> tar xvfz GD-2.53.tar.gz
> cd GD-2.44
> perl Makefile.PL
> make
> make test
> make install
I expect it to contain the line like this which is a hallmark of the installed PNG support:
Included Features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE
GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF
GD_FTCIRCLE VERSION_33
But instead I got this only:
Included Features: GD_GIF GD_GIFANIM GD_OPENPOLYGON
I wasn't successful with this command either sudo perl Makefile.PL -options "JPEG,FT,PNG".
It didn't show GD_PNG.
What's the way to install GD.pm with PNG support?
I need it to run circos.
Update:
After installing libpng and rebuilding GD
$ brew update && brew upgrade
$ brew install gd
$ brew install libpng
$ sudo cpan
cpan > force install GD
as adviced, I got this error:
$ perl -e 'use GD; $im=GD::Image->new(); print $im->can("png") ? "yes" : "no" , "\n";'
Can't load '/Library/Perl/5.16/darwin-thread-multi-2level/auto/GD/GD.bundle' for module GD: dlopen(/Library/Perl/5.16/darwin-thread-multi-2level/auto/GD/GD.bundle, 1): Library not loaded: libpng15.15.dylib
Referenced from: /usr/local/lib/libfreetype.6.dylib
Reason: image not found at /System/Library/Perl/5.16/darwin-thread-multi-2level/DynaLoader.pm line 194.
at -e line 1.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
Update 2:
Finally I fixed the problem by doing this:
$ locate libpng15.15.dylib
/anaconda/lib/libpng15.15.dylib
/anaconda/pkgs/libpng-1.5.13-1/lib/libpng15.15.dylib
/opt/X11/lib/libpng15.15.dylib
/opt/local/lib/libpng15.15.dylib
$ ln -s /opt/X11/lib/libpng15.15.dylib /usr/local/lib/libpng15.15.dylib
$ perl -e 'use GD; $im=GD::Image->new(); print $im->can("png") ? "yes" : "no" , "\n";'
yes
You need libraries as dependencies before making GD.pm. In this particular case libpng is obviously missing.
Because of that dependency, I recommend that you use package managers, not CPAN, if your perl is the one that comes with your OS:
MacPorts or homebrew for OS X
apt-get for Debian and Ubuntu.
yum for RHEL, Cent-OS.
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