pecl install gnupg, could not extract the package.xml - pecl

I am having problems installing a package with pecl. My system runs Gentoo Linux. It does not accept the package that I am trying to install.
# pecl install gnupg
downloading gnupg-1.3.3.tgz ...
Starting to download gnupg-1.3.3.tgz (19,141 bytes)
......done: 19,141 bytes
could not extract the package.xml file from "/var/tmp/pear/gnupg-1.3.3.tgz"
Download of "pecl/gnupg" succeeded, but it is not a valid package archive
Error: cannot download "pecl/gnupg"
Download failed
install failed
The tarball looks fine and does indeed have a package.xml...
# tar -zxvf /var/tmp/pear/gnupg-1.3.3.tgz
package.xml
gnupg-1.3.3/tests/gnupg_oo_0001_import.phpt
gnupg-1.3.3/tests/gnupg_oo_encrypt.phpt
gnupg-1.3.3/tests/gnupg_oo_encryptsign.phpt
gnupg-1.3.3/tests/gnupg_oo_export.phpt
gnupg-1.3.3/tests/gnupg_oo_keyinfo.phpt
gnupg-1.3.3/tests/gnupg_oo_listsignatures.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_clear.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_detach.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_detach_nonarmor.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_normal.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_normal_noarmor.phpt
gnupg-1.3.3/tests/gnupg_oo_zzz_deletekey.phpt
gnupg-1.3.3/tests/gnupg_res_0001_import.phpt
gnupg-1.3.3/tests/gnupg_res_encrypt.phpt
gnupg-1.3.3/tests/gnupg_res_encryptsign.phpt
gnupg-1.3.3/tests/gnupg_res_export.phpt
gnupg-1.3.3/tests/gnupg_res_keyinfo.phpt
gnupg-1.3.3/tests/gnupg_res_listsignatures.phpt
gnupg-1.3.3/tests/gnupg_res_sign_clear.phpt
gnupg-1.3.3/tests/gnupg_res_sign_detach.phpt
gnupg-1.3.3/tests/gnupg_res_sign_detach_nonarmor.phpt
gnupg-1.3.3/tests/gnupg_res_sign_normal.phpt
gnupg-1.3.3/tests/gnupg_res_sign_normal_noarmor.phpt
gnupg-1.3.3/tests/gnupg_res_zzz_deletekey.phpt
gnupg-1.3.3/tests/vars.inc
gnupg-1.3.3/config.m4
gnupg-1.3.3/EXPERIMENTAL
gnupg-1.3.3/gnupg.c
gnupg-1.3.3/gnupg_keylistiterator.c
gnupg-1.3.3/LICENSE
gnupg-1.3.3/php_gnupg.h
gnupg-1.3.3/php_gnupg_keylistiterator.h
gnupg-1.3.3/README
It would be good if someone could explain this better and help me fix it. Google results were very discouraging. It seems nobody else is having this problem.
I used to use the package in Gentoo portage dev-php/pecl-gnupg but that only supports 5.3. So I need to use pecl from now on to get the module for PHP 5.5. PHP 5.3 is now EOL.

I worked out how to manually install it...
After extracting the package, change to it's directory and run these commands...
phpize
aclocal
libtoolize --force
autoheader
autoconf
./configure
make
sudo make install

Related

How do I install an older ethtool version on a machine?

I need to test if some firmware is compatible with older ethtool versions.
The machine I am using currently have ethtool version 5.16, but I need to install ethtool version 5.13
I got the compressed file from https://mirrors.edge.kernel.org/pub/software/network/ethtool/ and have used tar -zxvf https... to extract the files. This extracts a directory with the contents shown below:
After reading the INSTALL file, I ran ./configure but it gave me the following error: configure: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config
This meant that I could not run make or make install and thus am stuck.
After speaking to colleagues, the solution was found:
apt-get install -y pkg-config. Thereafter the following package was also needed: apt-get install -y libmnl-dev
Simple installed it with ./configure, make and make install and saw the ethtool version was as desired.

Running CMake on Amazon Linux

I am trying to build OpenJpeg on an AWS Amazon Linux EC2 instance. I installed cmake and gcc and had no issues during installation. When I try to cmake openjpeg I get the following error:
-- Check if the system is big endian
-- Searching 16 bit integer
CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:44 (message):
no suitable type found
Call Stack (most recent call first):
CMakeLists.txt:164 (TEST_BIG_ENDIAN)
-- Configuring incomplete, errors occurred!
Checking the error logs it seems CMake is unable to determine the size of integers, shorts and longs. The full error log can be found in this gist
How can I work this out and make CMake work?
Amazon has a guide: Preparing to Compile Software, which proposes the following command to install a C compiler.
sudo yum groupinstall "Development Tools"
Next, you can download and build Cmake yourself: Install Cmake 3.
wget https://cmake.org/files/v3.18/cmake-3.18.0.tar.gz
tar -xvzf cmake-3.18.0.tar.gz
cd cmake-3.18.0
./bootstrap
make
sudo make install
Note: the last make actually needs sudo.
This works in the most recent Amazon Linux image (Nov 2021):
# Install sudo, wget and openssl, which is required for building CMake
yum install sudo wget openssl-devel -y
# Install development tools
sudo yum groupinstall "Development Tools" -y
# Download, build and install cmake
wget https://cmake.org/files/v3.18/cmake-3.18.0.tar.gz
tar -xvzf cmake-3.18.0.tar.gz
cd cmake-3.18.0
./bootstrap
make
sudo make install
Though this does not actually answer why the error was happening but I was able to build OpenJpeg by building CMake from source. So I just removed Cmake which was installed via yum and I believe was 2.8.12. Downloaded the latest CMake3 sources (v 3.10) built Cmake and openjpeg and all my other packages with no issues.
You could try to set up a Docker container to replicate correct environment. This way, you could form a container on your local machine, make sure it all builds on the container environment, and later use this environment on the EC2.
There is a project on Github that provides a Docker image which can be used to compile for Lambda and test stuff locally. Have a look: https://github.com/lambci/docker-lambda

How to install PhantomJS on vps?

I tried to use pip install, but it tells cannot find such package.
I also see someone say we can use brew and nodejs to install. This is what I tried to install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It returns that ruby doesn't found.
I have no idea about nodejs.
Anyone knows how can I install PhantomJS in the server?
Meet npm!
Npm stands for Node Package Manager.
You can install packages for using them from the CLI or from your nodejs app.
You can install NPM from here.
If node isn't installed yet, you can use NVM, which makes it really easy -
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
For your question,
See this specific package.
You can install it via:
$ npm install phantomjs-prebuilt
And then you should be able to: $ bin/phantomjs [phantom arguments] to run phantomJS from the terminal.
PhantomJS is a standalone application with its own website which has binaries for all major platforms and documentation. You don't really need pip or npm or bundler to install it, just do it manually.
Go to http://phantomjs.org/download.html
Choose the appropriate binary (Linux x32 x64 / OSX / Windows), download archive, extract it and run the binary.
For example you have a x64 Linux distribution.
Log in to your server via ssh.
Go to your home directory:
cd ~
Download PhantomJS binary:
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Extract archive:
tar xvf phantomjs-2.1.1-linux-x86_64.tar.bz2
A new directory is created: phantomjs-2.1.1-linux-x86_64. The PhantomJS binary is phantomjs-2.1.1-linux-x86_64/bin/phantomjs. You can run it right now:
~/phantomjs-2.1.1-linux-x86_64/bin/phantomjs --version
2.1.1
(If it says "not found " instead that means you chose the wrong distribution, e.g. x64 instead of x32).
But this way of running it is inconvenient. It would be way better to be able to just type phantomjs script.js in any directory. To make it so add a link to a directory where binaries are kept by default:
sudo ln -s ~/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
Then you can call PhantomJS from anywhere:
cd /var/www/
phantomjs --version
2.1.1

Not able to install mod_perl module on the server

In my site I am getting an error : an error occurred while processing this directive
It was working fine before moving to the new server. So when I checked I found that mod_perl module is missing. So I tried to install it by downloading the module to the server and then tried to run using Perl Makefile.pl but it was asking for apache src and I was not able to find it. I can see /usr/bin/apache/ folder but no source file inside the folder.
So I tried to install the module from Cpanel but I got the following error:
The C compiler is not functional and auto repair failed. Perl module installs require a working C compiler. Please repair the C compiler and try again.
Please let me know how to install it as I have tried most of the cases searching the net.
Thanks in advance
It's probably best to use your distro's packaging system to install mod_perl, especially, if apache is installed from a package too.
Yum based systems:
yum install mod_perl
Deb based systems
apt-get install mod_perl
you may need to enable the module using a2enmod
Mostly gcc is either corrupted or not present on your system. Please try to re/install gcc on your system
sudo apt-get update
sudo apt-get install build-essential
On Redhat:
yum update
yum install devtoolset-2-toolchain
It seems like a problem with your installation of gcc. You're using CloudLinux, so you should use yum to reinstall gcc.
$ sudo -i yum install gcc
But you don't need gcc if you install the pre-build packages.
$ sudo -i yum install mod_perl
Either way, you're going to need to get to grips with package installation for your system - and for that you're going to need root access.

Configuration for Java binding for ZeroMQ (0MQ) with no root privileges on Linux

I am a novice with zeroMQ and I am stuck at binding ØMQ with java on a server running CentOS release 5.9.
Unfortunately, I do not have super user/root privileges on the server and am trying to install ØMQ as a normal user with restricted privileges. I have installed ØMQ by following instructions on http://www.zeromq.org/area:download
Make sure that libtool, autoconf, automake are installed.
Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
Unpack the .tar.gz source archive.
Run ./configure, followed by make.
Could not run the following obviously
To install ØMQ system-wide run sudo make install.
On Linux, run sudo ldconfig after installing ØMQ.
Then I attempted to install jzmq.
Cloned [git clone https://github.com/zeromq/jzmq.git]
Ran autogen.sh
Ran configure
At this point I get the following error
checking for ZeroMQ... no
checking zmq.h usability... no
checking zmq.h presence... no
checking for zmq.h... no
configure: error: cannot find zmq.h
As a result of the above error I am not able to run java tests and get error "no jzmq in java.library.path".
Can anybody help/direct me to how to get java binding for zeromq work when you dont have root privileges to install it? Its difficult to get IT department to install a new software on servers.
Appreciate your help.
Note: I do not have write permissions to /usr directory
Thanks
GBP
This can be overcome by adding --with-zeromq=/home/user/zeromq (installation directory of zeromq)
./configure --with-zeromq=/home/user/zeromq
Other steps include
export LD_LIBRARY_PATH=/home/user/zeromq/lib
You can also use JeroMQ (https://github.com/zeromq/jeromq) which is a pure Java implementation of ZeroMQ
I got this working by running autogen.sh on OEL 6 then running configure / compiling / installing on CentOS 5.9. I briefly looked into why autogen.sh was failing and the problem was the tool chain was too old. Since I had a more up-to-date system with a modern tool chain available running autogen.sh on something other than CentOS 5 was the easiest path for me. I'm sure it works fine with other modern Linux variants, I had OEL 6 at my finger tips.
I also did not have access to a standard directory for installation. To get that working I added zmq.jar to my class path, and the run-time linker needed to be able to find the zeromq and jzmq run-time libraries.
I faced the same issue on CentOS 6.5 and found that you need to install "gcc-c++" for this to work.
I used the following to install dependencies:
yum -y install jdk zeromq-devel unzip libtool gcc autoconf automake gcc-c++ python
Note that "jdk" comes from our private repository and it's same what can be downloaded from java.com
The following public repositories are installed on server:
atomic
Actually, I ended up having this same issue, and the following script worked for me, where I installed zeromq into ~ (so that I have ~/lib contains libzmq.a libzmq.la libzmq.so libzmq.so.3 libzmq.so.3.1.0 pkgconfig)
./autogen.sh ./configure --prefix=$HOME \ #because you don't have root privileges
--with-zeromq=$HOME --includedir=$HOME/include/ --libdir=$HOME/lib/
./make
./make -n install
#to check to see if it installs it to the right location
make install