Categories
HowTo Posts Ubuntu

HowTo: Fix “An error occurred while mounting” – Ubuntu Lucid (10.04)

An error occurred while mounting /dev/bus/usb (and/or)
An error occurred while mounting /proc/bus/usb

Press S to skip mounting or M for manual recovery

If you are seeing this error on boot an easy way to get rid:

  1. sudo gedit /etc/fstab
  2. Fine the following line (or lines if you are having both errors)
  3. none /proc/bus/usb usbfs defaults,devmode=0666 0 0
    none /dev/bus/usb usbfs defaults,devmode=0666 0 0

  4. Add a # infront of them to comment it out
  5. Save & Exit.

As far as I am aware everything is still working fine and it might just be something left in from Karmic which isn’t needed any longer but just to make sure comment out these lines rarther than removing them.

Categories
HowTo Posts Ubuntu

HowTo: Fix Jumping/Skipping Sound in Spotify under Wine – Ubuntu Karmic (9.10)

The sound in Spotify was jumping or skipping much like a scratched disk would. After a little investigation I found a couple of ways to fix it with people saying one worked but the other didn’t for them. (Solution 2 worked for me).

Solution 1:

Open terminal and type:

winecfg

Click on the Audio tab along the top and remove ALSA and try OSS as your sound drivers

Solution 2:

gedit ~/.asoundrc

add the following line to the file:
pcm.pulse { type pulse } ctl.pulse { type pulse } pcm.!default { type pulse } ctl.!default { type pulse }

gedit /etc/pulse/daemon.conf

change the following to lines as shown below

default-fragments = 8
default-fragment-size-msec = 5

Categories
HowTo Posts Ubuntu

Howto: Reinstall Grub using Ubuntu Live CD

I recently installed Fedora 12 on my desktop alongside Ubuntu Karmic and Windows 7, however doing so I overwrite my grub which meant my Ubuntu system was hidden. To fix this is pretty simple..

Insert your Ubuntu Live CD
Click “Try Ubuntu without any changes to your computer”
Once loaded click Applications > Accessories > Terminal

sudo fdisk -l 

#That’s a lower case L
This displays all partitions on your system, in my case the installation of my Ubuntu system was /dev/sda5 so replace this for yours in the rest of the code.

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

#thats a double dash before root-directory, wordpress keeps changing it to a long dash, Ill fix it sometime..
If all goes successfully you should be done, try rebooting and see if your Ubuntu shows up.

Thanks to Whiblog in the comments this also works in Ubuntu 11.04:

“same thing except the last line : sudo grub-install –boot-directory=/mnt/ /dev/sda”

Categories
OpenCV Posts Ubuntu

Yet Another OpenCV/Karmic error – symbol lookup error: /usr/local/lib/libhighgui.so.4

symbol lookup error: /usr/local/lib/libhighgui.so.4: undefined symbol: av_free_packet

To fix it simply make sure /usr/local/lib is in your library path by using the following command:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Categories
HowTo Posts Ubuntu

Howto fix: “error while loading shared libraries”

While installing opencv on an older version of debian for work I kept getting an error while loading shared libraries which turned out to be a pretty easy fix, just finding the libraries and adding them to the dynamic linker.

The libraries I was having trouble with below:
./blobtrack: error while loading shared libraries: libcxcore.so.1: cannot open shared object file: No such file or directory

ffmpeg
ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory

I used the ‘locate’ command to find where the libraries were eg:
locate libcxcore.so.1
This outputted a few locations of where the library was, I decided to use the /usr/local/lib version as both libraries I needed were in there and did the following command to add them to ld.so.conf and reload the dynamic linker:
sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf && ldconfig'

Categories
Posts Ubuntu

Error: Dependency is not satisfiable: libstdc++5 (Ubuntu Karmic)

Error: Dependency is not satisfiable: libstdc++5
This is a simple fix, just grab the libstdc++5 package for your architecture from here:
http://packages.debian.org/stable/base/libstdc++5

Categories
HowTo Posts Ubuntu

HowTo: Install Player/Stage in Ubuntu Karmic (9.10)

UPDATE:
There is a much easier way of installing player/stage in Ubuntu 9.10 as pointed out by Arkapravo in the comments, however this is the 2.0.4-3.3ubuntu3 where as of 21/May/2010 the latest version is 3.0.1 if this causes any issues with your needs.
sudo apt-get install robot-player stage
also check out: http://icrobotics.co.uk/wiki/index.php?title=Player/stage
END UPDATE

I was able to install Player but not Stage using the usual install method which can be seen below how I did it:
You will need to have cmake and build-essentials installed:
sudo apt-get install cmake build-essential
How To Install Player:
Player provides a network interface to a variety of robot and sensor hardware. Player’s client/server model allows robot control programs to be written in any programming language and to run on any computer with a network connection to the robot. Player supports multiple concurrent client connections to devices, creating new possibilities for distributed and collaborative sensing and control.
Download the latest tar (I used player-3.0.0.tar.gz in this guide, if those numbers come up just change them with the version you are using)
http://sourceforge.net/projects/playerstage/files/
Extract
tar zxvf player-3.0.0.tar.gz
cd player-3.0.0
Make a folder to store the build files
mkdir build
cd build
Configure using
cmake ../
Now make and install
make
sudo make install
How To Install Stage:
Stage simulates a population of mobile robots moving in and sensing a two-dimensional bitmapped environment. Various sensor models are provided, including sonar, scanning laser rangefinder, pan-tilt-zoom camera with color blob detection and odometry.
Install some needed libraries:
sudo apt-get install libfltk1.1 pkg-config libtool
You will also need to install openGl:
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
You will need to download and install fltk-1.1.x and do the usual:
(I used fltk-1.1.10rc3 found here)
tar zxvf fltk-1.1.10rc3-source.tar.gz
cd fltk-1.1.10rc3/
./configure –enable-gl
make
sudo make install
Download and extract Stage (as you can see I used 3.2.2)
http://sourceforge.net/projects/playerstage/files/
tar zxvf Stage-3.2.2-Source.tar.gz
cd Stage-3.2.2
Make somewhere to store the build files
mkdir build
cd build
Configure:
cmake ../
Make and install:
make
sudo make install
Currently this will output the following error:
collect2: ld returned 1 exit status
make[2]: *** [libstage/stage] Error 1
make[1]: *** [libstage/CMakeFiles/stagebinary.dir/all] Error 2
make: *** [all] Error 2
I will make an update on this post when I find out how to fix this, comment if you know how!

Categories
HowTo OpenCV Posts Ubuntu

HowTo: Install OpenCV in Ubuntu Karmic (9.10)

Heres how I got OpenCV installed:

First install some needed packages

sudo apt-get install build-essential libgtk2.0-dev

Now you need to grab FFmpeg for the install to work

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

The svn didn’t work for me, probably something to do with the proxy I’m under at Uni so I had to grab the source and compile it:

Download – http://ffmpeg.org/releases/ffmpeg-0.5.tar.bz2

(skip the tar step if you svn the package)

tar -jxvf ffmpeg-0.5.tar.bz2

Configure and install ffmpeg

cd ffmpeg

./configure --enable-shared

make

sudo make install

Next grab a copy of OpenCV (I used OpenCV-2.0.0.tar.bz2 in this guide)

Download – http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.0/

tar -jxvf OpenCV-2.0.0.tar.bz2

cd OpenCV-2.0.0

./configure --with-ffmpeg --with-gtk --with-quicktime=false

make

sudo make install

Now you should be setup, try running one of the sample programs to test it:

cd samples/c/

. build_all.sh

./facedetect

Categories
HowTo OpenCV Posts Ubuntu

Problems Installing OpenCV in Ubuntu Karmic (9.10)

UPDATE

I now have it working and wrote a guide of how I got it to work –

http://alexsleat.com/2009/12/02/howto-install-opencv-in-ubuntu-karmic-9-10/

END UPDATE

I found a great guide on getting OpenCV to install on Ubuntu Karmic (9.10) –http://ivkin.net/2009/11/installing-opencv-2-0-on-ubuntu-9-10-karmic-koala/

Most the comments show the guide works however I have a couple of problems:

Firstly when reloading the libraries to make opencv show up
ldconfig -v | grep opencv
That results in the following output:
/sbin/ldconfig.real: Cannot stat /lib/i486-linux-gnu: No such file or directory
/sbin/ldconfig.real: Cannot stat /lib64: No such file or directory
/usr/local/opencv/lib:

However continuing on with the installation and it is able to compile all the sample programs, but when attempting to run most of them it seems it fails at running the GUI:
./facedetect
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file highgui/window.cpp, line 100
terminate called after throwing an instance of 'cv::Exception'
Aborted

When I find the fix for this I will make sure to update the post, if you find my post and fix it yourself please leave a comment how you did it.