Error while loading shared libraries – Mandriva

Problem
After installing a package and trying to run it in Mandriva 2010 64, you get errors about missing libraries, like:

error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

Solution
Use the urpmf command to find the packages that contain the missing libraries like :

urpmf libasound.so.2

and then when you get something like the following:

lib64alsa2:/usr/lib64/libasound.so.2
lib64alsa2:/usr/lib64/libasound.so.2.0.0
lib64alsa2:/usr/lib64/libasound.so.2
lib64alsa2:/usr/lib64/libasound.so.2.0.0
libalsa2:/usr/lib/libasound.so.2
libalsa2:/usr/lib/libasound.so.2.0.0
libalsa2:/usr/lib/libasound.so.2
libalsa2:/usr/lib/libasound.so.2.0.0

install the missing packages with:

sudo urpmi lib64alsa2
or/and
sudo urpmi libalsa2

OSx – VMware – Mandriva resizing partition

Problem
When you use WMware to run Mandriva or any other distribution on Mac OSx, if you resize the hard disk partition in VMware your Mandriva system won’t automatically resize the partition to use the newly available space.

Solution
To be able to use the available space the quickest solution is:

  • restart your VMware session but run in safe mode
  • start up drakdisk
  • select the partition you want to resize. WARNING (Make sure you back up important data – even though in my case everything went smoothly)
  • umount the select partition and resize using all the avaliable free space
  • after a few minutes you should be able to restart your VMware and login to your virtual machine as normal, and the partition should be resized

Arduino Uno – Mandriva 64

Problem
You would like to use the Arduino Uno board with Mandriva but you are running into errors and problems installing it.

Solution
Download the latest code from the arduino website and extract the file somewhere.

Add your username to the dialout and uucp groups so you don’t get permissions errors.

install the avr-gcc package:
$ sudo urpmi avr-gcc

if everything works as it should then you should be able to select the port from the arduino IDE (Tools -> Serial Port -> /dev/ttyACM0)

You should then be able to communicate with the Arduino board by using one of the examples (ie Examples/Basic/Blink)

ImageMagick, RMagick, Mandriva 64 installation

Problem
You want to use the rmagick gem in your ruby on rails project, but you need to install the imagemagick first.

Solution
If Imagemagick is not already installed, use the following to install it:
$ sudo urpmi imagemagick$ sudo urpmi lib64magick-devel

You should then be able to install and use the rmagick gem

no such file to load — readline (LoadError) in Rails 3.0.7 – Mandriva 2011 64

Problem

When you try to run the console rails c in a new Rails 3.0.7 application, in Mandriva 2011 64bit, and when you use rvm, you get the following error:

no such file to load -- readline (LoadError)

Solution

Similar to an earlier post here, the solution is as follows with the new requirements described

It’s quite like likely that the readline libraries are missing from your installation. To find out which ones go to the directory that the error is indicating (ie):

cd ~/.rvm/src/ruby-1.9..2-head

and then to the following:

cd ext/readline

then run the following:

ruby extconf.rb

If you get something like:
checking for readline/readline.h... no
checking for editline/readline.h... no

then you are probably missing the neccessary header files for readline.
so install them in your system (ie in Mandriva):

sudo urpmi lib64readline-dev,

When the package is installed successfully run the following again:

ruby extconf.rb
make
sudo make install

You should now be able to go back to your project and run rails c with no errors.

no such file to load — readline (LoadError) – Rails 3.0.3 console – rvm

Problem

When you try to run the console rails c in a new Rails 3.0.3 application, and when you use rvm, you get the following error:

no such file to load -- readline (LoadError)

Solution

It’s quite like likely that the readline libraries are missing from your installation. To find out which ones go to the directory that the error is indicating (ie):

cd ~/.rvm/rubies/ruby-1.8.7-p299

and then to the following:

cd ext/readline

then run the following:

ruby extconf.rb

If you get something like:
checking for readline/readline.h... no
checking for editline/readline.h... no

then you are probably missing the neccessary header files for readline.
so install them in your system (ie in Mandriva):

sudo urpmi readline-dev,

In Debian you will need to install libreadline5-dev and maybe libncurses5-dev (apt-get install).

When the package is installed successfully run the following again:

ruby extconf.rb
make
sudo make install

You should now be able to go back to your project and run rails c with no errors.

ATI Radeon HD-4350 Mandriva 2010 Dual Monitor

Problem
Trying to get Mandriva 2010 to work on a dual monitor with an ATI Radeon HD 4350. Desktop used is a Dell Vostro 430 and two BenQ G920WL monitors.

Solution
After reading the articles here and here, the steps required were:

  • Select driver ATI Radeon HD 2000 and later (radeon/fglrx)
  • Don’t select proprietary driver from next screen
  • Run xrandr -q to find out the name of the monitors
  • From the output find out the current resolution (1440×900), names (VGA_1,DVI-I_2/analog) and maximum resolution (1440×900)
  • Edit the xorg.conf file (/etc/X11/xorg.conf) and add the Virtual 2880 900 (without quotes) underneath the Modes line in the Display Subsection
  • Save the file and restart the X server
  • Run again the xrandr -q command and make sure the maximum resolution has changed to 2880×900
  • Run xrandr –output DVI-I_2/analog –auto –right-of VGA_1 to put one screen next to the other
  • Follow the description here to set it up permanently on login