ubuntu 11.10 readline error - ruby-on-rails-3

I'm getting a problem while running my project in ubuntu 11.10.
/home/kranthi/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/i686-linux/readline.so: libreadline.so.5: cannot open shared object file: No such file or directory - /home/kranthi/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/i686-linux/readline.so (LoadError)
this is the error.can anyone help me in solving this?
Thanks.

On some Linux Distributions you have the option to install a special libreadline version for ruby. I solved my Problem on an Ubuntu Box.
For Ubuntu or Debian:
sudo apt-get install libreadline-ruby
or
sudo aptitude install libreadline-ruby

You seem to be missing the readline lib. I don't have a linux install close by, but something like sudo apt-get install libreadline should solve your problem. Maybe I got the name of the package wrong, don't hesitate to make a quick search
EDIT : what about rvm pkg install readline?

Related

Ubuntu Cannot reinstall coreutils

I deleted the usr/bin/env directory/file in my Ubuntu16.04 by mistake. Everytime i try to reinstall coreutils with this command:
sudo apt-get install --reinstall coreutils, i get this error:
Reinstallation of coreutils is not possible, it cannot be downloaded.
I can't use npm because it needs that directory.
Please help.
I solved this by manually getting the env file from the coreutils package i downloaded from the Ubuntu site and replacing where i deleted it.

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.

phpredis extension doesn't work, unable to load 'redis.so'

I installed nginx, php, php-fpm, php-pecl-redis by yum.
All of them work but the last one.
When I run /usr/sbin/php-fpm, I got this:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/redis.so' - /usr/lib/php/modules/redis.so: undefined symbol: igbinary_unserialize in Unknown on line 0
I don't know what igbnary_unserialize means and how to fix it.
I checked the redis.so file under right path. I add extension=redis.so to php.ini
PHP version: 5.3.3
PhpRedis version: 2.2.7
I had the same issue. I'm on Ubuntu 16.04 LTS. Running sudo apt-get install php-igbinary resolved the issue for me. I have other issues, but that's what solved this one.
For people who are upgrading their php from 7.0 to 7.4 like me, and not able to get php-redis working. These are the steps I used after following the answers above.
1) remove Redis
sudo apt purge php-redis
2) Install Igbinary
sudo apt-get install php-igbinary
3) Install php-redis again
sudo apt-get install php-redis
I did the steps above because it seems only php7.0 is recognising the php-redis install but not the currently enabled php7.4
I also recommend removing other versions of PHP if you have should your problem continue unsolved.
Probably an issue with igbinary, is this installed? (try for example: cat /etc/php.d/igbinary.ini).
Here you can find and install igbinary
Related to this bug https://bugs.launchpad.net/ubuntu/+source/php-redis/+bug/1762935
You should remove php-redis from packages:
apt purge php-redis , and install it via pecl install redis
You should add "extension=redis.so" to php.ini
and remove redis from config.d in your php directory:
rm /etc/php/7.2/fpm/conf.d/#20-redis.ini
and
rm /etc/php/7.2/cli/conf.d/#20-redis.ini
restart php fpm and you will see that problem solved
On Ubuntu 20 and PHP 7.4
I did this and it worked :
sudo apt purge php-redis
sudo apt intall php-redis php7.4-redis
TEST redis server :
$ php --ri redis
or
$ redis-cli ping
$ redis-cli info stats
just resolve the same problem:
php-pecl-redis installed by yum will cause this problem.
so you need to install the php-redis manually. wget the package and phpize - configure - make ....

cmake not working, could not exec qmake

I am using Ubuntu 14.04. I'm trying to install a program which requires cmake. When I run cmake src/ I get:
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
What am I doing wrong?
Does the trick:
sudo apt-get install qt4-qmake
You do not need to install half a gigabyte of qt sdk!
I read on another post that the problem has something to do with CMake not being able to find Qt4 qmake.
However in my case, it was simply a matter of not having qt4-qmake. This solved it (but weighs a heavy 440MB):
sudo apt-get install qt-sdk
For newer versions of Ubuntu, if you have only installed version 5 of the Qt Framework, you may get this error. If you want to use Qt version 5 by default, then you should run the following command to fix the error:
sudo apt install qt5-default
You need the qt dependences:
sudo apt-get install qt4-qmake libqt4-dev
as it says in docs: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#debian--ubuntu
sudo apt-get update
sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
works for me in Ubuntu 18.04
You can use QtCreator to compile the cmake project too. This is only advantageous over the accepted answer if you already have QtCreator installed, I notice you are using a qmake project so this might be likely.
The main advantage of this is that qt creator will be configured to use the qmake tool without the need to install the command line configured version of qmake.
Incidentally, I get this error if I try to run the qmake executable bundled with QtCreator on the command line.

Installing gdal-config on my linux

I search the entire net could not find a guide to get gdal-config.
I have yum but yum does not have gdal-config, i already installed gdal.
I just need to be able to do this on shell - gdal-config and not get a command not found error.
My distro is Fedora. I don't have apt-get.
You probaby have "yum" instead of "apt-get" on Fedora. Try..
yum install gdal gdal-devel
I'm running Ubuntu 16.04, so I use apt-get instead of Yum. But I had trouble with gdal and gdal-develop. This is command that worked for me:
sudo apt-get install gdal-bin libgdal-dev
I found the package names from here:
https://launchpad.net/ubuntu/+source/gdal
I had a similar problem, that is "gdal-config" was missing. I could solve it by installing the development packages. So you could try installing gdal-dev.
As far as I know, the GDAL utilities, including gdal-config, are part of the download package that you can find here: http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries. They link to a Fedora version. If you installed apt-get, you could find it by looking for GDAL directly.