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)

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.

Problem with Sansa mp3 player automatic connection in Mandriva

Problem
After an upgrade my Sansa E260 is no longer automatically recognised in Mandriva and looking at the /var/log/messages displays the error:
reset high speed USB device using ehci_hcd and address 5

Solution
Run as su the following (maybe a couple of times), while the sansa is connected:
sudo rmmod ehci_hcd
sudo modprobe ehci_hcd

Mandriva – Eclipse – Aptana RadRails

Problem
You want to do a new installation of Aptana RadRails IDE in Mandriva as an eclipse plugin.

Solution

  • Install eclipse first (selecting openjdk when prompted):
    sudo urpmi eclipse
  • According to the instructions here take the following steps:
  • From the Help menu in Eclipse, select Software Updates
  • Select the Available Sotware tab
  • Click the “Add Site..” button.
  • Specify the Location Url update site: http://update.aptana.com/update/studio/3.4/ and click OK
  • Select the checkbox next to the added update site.
  • Click the install button.
  • Complete instruction to install from update site and restart eclipse
  • Go to ‘My Aptana’ page and then the ‘Plugins’ tab on the top
  • Click on Aptana Rad Rails ‘Get It’ link and get through the next sequence of screens select ‘ok’.
  • Restart Eclipse and RadRails should now be installed.