iPhone mount errors

When I plug my iPhone (iOS 5) into my laptop with Ubuntu 11.10, I get this error:

Unable to mount Documents on iPhone. Location is already mounted

followed by this error:

Unable to mount iPhone. Location is already mounted

After I see these errors, the "Documents on iPhone" folder pops up. How do I fix this?


Solution 1:

@Lekensteyn - here is a simple description of these commands do:

  1. download and install library 'libimobiledevice-utils' from known sources

    sudo apt-get install libimobiledevice-utils
    
  2. and once done

    ;
    
  3. unmount and mount your iPhone

    idevicepair unpair && idevicepair pair
    

Running a command with sudo will require you to have root access rights and you'll be prompted to input password for root user. So technically it may not be possible in a corporate/locked-down environment where users are not deemed to have root access.

Solution 2:

sudo apt-get install libimobiledevice-utils;idevicepair unpair && idevicepair pair