Installing Rglpk on linux - install.packages

I am trying to install Rglpk using the install.packages command. I am getting this error :
/bin/sh: line 0: cd: GLPK: No such file or directory
make: *** [GLPK.ts] Error 1
The glpk-dev package is already installed :
rpm -qa| grep glpk-dev
glpk-devel-4.40-1.1.el6.x86_64
Thanks for your help,

Hi what I did was the following as a sudoer
cd usr local
wget http://ftp.gnu.org/gnu/glpk/glpk-4.54.tar.gz
tar xfzv glpk-4.54.tar.gz
mkdir GLPK
./configure
make
make install
then download the Rglpk_0.6-0.tar.gz and install.package the usual way. It is basically the same as what was done here, but as a sudoer:

I got this fixed by running 'sudo make' and 'sudo make install' instead of 'make' and 'make install'. Not sure if this is good practice, someone else be the judge.
cd $HOME
wget http://ftp.gnu.org/gnu/glpk/glpk-4.65.tar.gz
tar xfzv glpk-4.65.tar.gz
mkdir GLPK
./configure
sudo make
sudo make install
Then run install.packages('Rglpk') from within R.

My experience was the following as a sudoer:
install GLPK package: see https://en.wikibooks.org/wiki/GLPK/Linux_OS
install Rglpk:
# install devtools package beforehand. Or, you can download the Rglpk package manually, and then install in R.
# note that the latest version of Rglpk does not work on my Redhat system. Instead, the version 0.6-0 works perfectly.
devtools::install_url("https://cran.r-project.org/src/contrib/Archive/Rglpk/Rglpk_0.6-0.tar.gz")
Testing: in R, try require(Rgplk)

Related

Failing to install VEP dependencies

I'm trying to install VEP, but am getting stuck installing its dependencies.
I try to install as suggested here https://www.ensembl.org/info/docs/tools/vep/script/index.html
cd ~/bin
git clone https://github.com/Ensembl/ensembl-vep.git
cd ensembl-vep
perl INSTALL.pl
But I get this error:
ERROR: DBI module not found. VEP requires the DBI perl module to function
http://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#requirements
So, I then try and install DBI as suggested here https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#requirements
cpanm DBI
But I get this error:
Can't write to cpanm home '/Users/michaelflower/.cpanm': You should fix it with chown/chmod first.
How to I 'fix' it with chown/chmod??
On Ubuntu 20.04 this worked for me:
sudo apt install libdbi-perl
But then I ran into a bunch of other errors which I solved sequentially by doing these things (I restarted the installation after every step but I guess if you first do them all, then it should work in 1 go):
sudo apt update # Or you'll more errors
sudo apt install unzip
sudo apt install build-essential
sudo apt install libbz2-dev liblzma-dev zlib1g-dev
sudo apt install libcam-pdf-perl
cpan Bio::DB:HTS # Takes a while as well
This perl modules wants to install
cpan Bio::SeqFeature::Lite # Takes quite a while
Which wants to install:
cpan XML::DOM XML::Parser::PerlSAX XML::Twig
Which then ultimately fails with:
Files=109, Tests=72, 4 wallclock secs ( 0.28 usr 0.09 sys + 2.29 cusr 0.83 csys = 3.49 CPU)
Result: FAIL
Failed 103/109 test programs. 32/72 subtests failed.
make: *** [Makefile:837: test_dynamic] Error 255
MIROD/XML-Twig-3.52.tar.gz
one dependency not OK (XML::Parser); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MIROD/XML-Twig-3.52.tar.gz
So I try to install XML::Parser
cpan XML::Parser
and it fails too
Note that if you build against a shareable library in a non-standard location
you may (on some platforms) also have to set your LD_LIBRARY_PATH environment
variable at run time for perl to find the library.
No 'Makefile' created TODDR/XML-Parser-2.46.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
I'll ddg some more...
... ok, I just reran to original install command and it crashes with a new message, it wants me to intall LWP::Simple. So I do, on my first attempt it crashed with a permissions error so I add sudo
sudo cpan LWP::Simple
Restarting install...
perl INSTALL.pl
SUCCESS!

PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' with Jenkins

I'm getting this warning when running the phpunit test suite in Jenkins pipeline.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' - /usr/lib/php/20160303/pdo_sqlite.so: undefined symbol: sqlite3_column_table_name in Unknown on line 0
However this warning is not thrown when running the test suite directly in terminal.
I have PHP 7.1 in my system and this is the only PHP version I have installed. php7.1-sqlite3 is installed.
Thank you in advance.
As far as I have found out, there is a faulty file in /usr/local/lib called libsqlite3.so.0 which points to libsqlite3.so.0.8.6. I renamed the file in case it was needed for something. With the command:
cd /usr/local/lib
sudo mv libsqlite3.so.0 ./libsqlite3.so.0.back
But you can also delete it:
rm libsqlite3.so.0
The thread that lead me to the answer: link
This solved my problems, and I hope they solve yours as well :)
I had this same issue with PHP 7.1 on Ubuntu 16.04.
Running the following fixed the issue for me:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1-sqlite3
Have you built SQLite from source? If yes, enable Column metadata and recompile with
CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" ./configure
make
sudo make install
Have fun using the cutting edge SQLite.
Reference - https://www.sqlite.org/compile.html#enable_column_metadata

Catkin command not found

I have installed ROS indigo and gazebo2 packages in Ubuntu 14.04.5. When I try to use catkin command, I get:
catkin_init_workspace : command not found
So, I tried to install catkin, it displays that ros-indigo-catkin is the latest version.
All I did was,
$ sudo apt-get install ros-indigo-desktop-full
$ sudo apt-get install gazebo2.<They're installed perfectly>
After this, I am getting catkin issue.
Help needed. Someone please find a way to fix this issue.
Had almost the same issue when i tried to run this command (please refer to the pics attached).
$ catkin build
Screenshot for solution applied to solve catkin build error
I solved it by installing catkin ROS build system using the command below (references attached in the links and pictures attached). Screenshot for catkin build error
$ sudo apt-get install ros-kinetic-catkin python-catkin-tools
If the workspace is setup, you properly sourced ROS as stated above, and if catkin_make works, but catkin build doesn't work do this:
sudo apt install python3-catkin-tools python3-osrf-pycommon
This is a catkin-tools dependency which was delinked in Ubuntu 20.04 so it has to be manually specified to be installed.
Probably you forgot to set up the environment after installing ROS.
$ echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
Then, I will assume you want to create a package, so you can follow these steps:
$ mkdir -p path_to_my_workspace/workspace_name/src
$ cd path_to_my_workspace/workspace_name/src
$ catkin_init_workspace
$ cd path_to_my_workspace/workspace_name/
$ catkin_make
$ source path_to_my_workspace/workspace_name/devel/setup.bash
After running these commands your workspace is created, so now you can start adding packages.
Maybe you didn't install "catkin ROS build system"
You can install it using the following command for ROS Melodic:
sudo apt-get install ros-melodic-catkin python-catkin-tool
or for ROS kinetic
sudo apt-get install ros-kinetic-catkin python-catkin-tool
If you want to create a ROS package, you can use: catkin create pkg myworkSpace --catkin-deps rospy
this command will create a ROS workspace with a source folder, CMakeLists.txt and package.xml
or use
mkdir catkin
cd catkin
catkin create pkg myworkSpace --catkin-deps rospy
The provided commands are for Python. So, make sure to modify it for Cpp if you want so.

erlang is no longer supported by Red Hat Enterprise Linux?

I'm trying installing Erlang on my REHL7.2, but unfortunately I failed. I tried two approaches
First I tried downloading a RPM package from official site of erlang (in fact the rpm package is for CentOS, but there's no RPM package for RHEL anyway), but
error: Failed dependencies:
libwx_baseu-2.8.so.0()(64bit) is needed by esl-erlang-19.0-1.x86_64
libwx_baseu-2.8.so.0(WXU_2.8)(64bit) is needed by esl-erlang-19.0-1.x86_64
Then I tried
$ wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
$ rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
But it failed too because
No package erlang available.
Error: Nothing to do
I wonder whether Erlang is no longer supported by RHEL? Otherwise how can I install Erlang on my RHEL7.2?
One simple solution to install the Erlang Solutions package is install the epel repository:
yum install epel-release
Then
wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
sudo yum install erlang
The epel repo contains the libwx_* libraries required.
As instructed here:
enter link description here
Run the following commands (note: the commands on the above link use R15B01, but in the following commands, I changed it to the last release of Erlang (R15B03) It will take a while to finish with the installation. Run commands line by line
sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf
wget http://erlang.org/download/otp_src_R15B03.tar.gz
tar zxvf otp_src_R15B03.tar.gz
cd otp_src_R15B03
./configure && make && sudo make install
After everything is done, you will be still at otp_src_R15B03 where Erlang is installed. Type erl and Enter, then, it should run and open Erlang prompt. I tried running Erlang from my home directory and from the root by just typing erl and it worked too. This way, Erlang is working good for me. To quit Erlang press CTRL + g then q and Enter
There is another way to install and useful info on this link:
enter link description here
I have figured it out! I found two solutions.
The first solution which is also the easiest way is to install a zero dependency version of erlang, please refer to my another Question. But I only tried this way after installing erlang from source, so if you failed this way, just try the following soltuion.
The other one is to build erlang from source (or by kerl which is essentially the same thing).
Install necessary dependencies:$sudo yum install ncurses-devel openssl-devel *openjdk-devel unixODBC unixODBC-devel
Download source code of erlang, unzip it and cd into the direcotry
sudo ./configure sudo make sudo make install
Please refer to this article.
Thank you everyone!
Try this, worked for me.
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum install erlang erlang-nox

ImageMagick - PECL issue - Cannot locate header file MagickWand.h

We are getting this error while installing ImageMagick PECL:
checking ImageMagick MagickWand API configuration program... found in
/usr/local/bin/MagickWand-config checking if ImageMagick version is at
least 6.2.4... found version 6.8.6 Q16 checking for MagickWand.h
header file... configure: error: Cannot locate header file
MagickWand.h ERROR: `/root/tmp/pear/imagick/configure --with-imagick'
failed extension imagick.so installed in /usr/local/lib/php.ini
/usr/local/bin/php does not have a php.ini Tidying
/usr/local/cpanel/3rdparty/php/53/etc/php.ini... No changes
Any idea how to fix this ?
This thread is old, but I solved this issue today on a Centos 7 by installing ImageMagick-devel package:
yum install ImageMagick-devel
Hope this helps.
Steps:
apt-get install libmagickwand-dev
/opt/lampp/bin/pecl install imagick
gedit /opt/lampp/etc/php.ini
add "extension=imagick.so" to php.ini
Probably its looking for the file MagickWand.h and unable to see that file in the defined location. Try these steps
wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
tar zxf imagick-3.1.0RC2.tgz
Edit the file imagick-3.1.0RC2/config.m4 line number 55.
Make changes like this, from
if test -r $WAND_DIR/include/ImageMagick/wand/MagickWand.h;
to
if test -r $WAND_DIR/include/ImageMagick-6/wand/MagickWand.h;
Note this difference made in the imagick version number. After that try the conventional installation procedures
cd imagick-3.1.0RC2
phpize
./configure
make
make install
Perhaps this http://thomas.bindzus.me/2013/08/11/building-pecl-imagick-for-php-5-5-1-on-centos-6-4/ can be of some help to others.
The solution described by Leo Prince almost worked for me, just had to set PKG_CONFIG_PATH, and perhaps that's just my server setup which isn't as perfect as it should be.
Here is what I did step-by-step (I'm running CentOS 6.4, Apache 2.4.6, and PHP 5.5.1):
wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
tar zxf imagick-3.1.0RC2.tgz
cd imagick-3.1.0RC
phpize
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure –with-imagick
make
make install
echo extension=imagick.so > /etc/php.d/imagick.ini
service httpd restart
php -m | grep imagick
First run following commands
1. "WHM Home » Software » Rebuild RPM Database"
2. yum install ImageMagick ImageMagick-devel
3. yum install pcre-devel
Then go to
Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the
box below “Install a PHP Pecl” enter “imagick” and click “Install Now”
button – that’s all. Restart Apache.
Above steps worked for me.

Resources