Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I faced an issue recently when tried to install ffmpeg on my Ubuntu computer. I am running Ubuntu 11.10 64 bit, all latest updates are installed and system runs perfectly, however i feel need in recording my desktop and have read many articles that ffmpeg is one of the best recording tools for it (besides providing packages for video) So I tried to run

sudo apt-get install ffmpeg

However i wasn't able to do this because packages have unmet dependencies. Here is a full text I receive after trying to install package above.

 Reading package lists... Done Building dependency tree        Reading
 state information... Done Some packages could not be installed. This
 may mean that you have requested an impossible situation or if you are
 using the unstable distribution that some required packages have not
 yet been created or been moved out of Incoming. The following
 information may help to resolve the situation:

 The following packages have unmet dependencies:  ffmpeg : Depends:
 libavcodec53 (< 4:0.7.3-99) but it is not going to be installed or
                    libavcodec-extra-53 (< 4:0.7.3.99) but 4:0.8.0.1~ppa2 is to be installed
           Depends: libavdevice53 (>= 4:0.7.3-0ubuntu0.11.10.1) but it is not going to be installed or
                    libavdevice-extra-53 (>= 4:0.7.3) but it is not going to be installed
           Depends: libavdevice53 (< 4:0.7.3-99) but it is not going to be installed or
                    libavdevice-extra-53 (< 4:0.7.3.99) but it is not going to be installed
           Depends: libavfilter2 (>= 4:0.7.3-0ubuntu0.11.10.1) but it is not going to be installed or
                    libavfilter-extra-2 (>= 4:0.7.3) but it is not going to be installed
           Depends: libavfilter2 (< 4:0.7.3-99) but it is not going to be installed or
                    libavfilter-extra-2 (< 4:0.7.3.99) but it is not going to be installed
           Depends: libavformat53 (< 4:0.7.3-99) but 4:0.8-1u1~ppa2 is to be installed or
                    libavformat-extra-53 (< 4:0.7.3.99) but it is not going to be installed
           Depends: libavutil51 (< 4:0.7.3-99) but it is not going to be installed or
                    libavutil-extra-51 (< 4:0.7.3.99) but 4:0.8.0.1~ppa2 is to be installed
           Depends: libpostproc52 (< 4:0.7.3-99) but 4:0.8-1u1~ppa2 is to be installed or
                    libpostproc-extra-52 (< 4:0.7.3.99) but it is not going to be installed
           Depends: libswscale2 (< 4:0.7.3-99) but 4:0.8-1u1~ppa2 is to be installed or
                    libswscale-extra-2 (< 4:0.7.3.99) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

This problem hasn't existed on my previous laptop which runs the same Ubuntu 11.10 64 bit as my new one. Can anyone please help me find a solution without "messing and braking" the whole system? Thank you for helping in advance.

share|improve this question
    
the usual solution is "sudo apt-get -f install <package>" –  Ringtail Mar 6 '12 at 21:39
add comment

3 Answers 3

up vote 1 down vote accepted

I'd think you've used this ppa, possibly to install vlc, which installed libavcodec-extra-53 4:0.8.0.1~ppa2 - https://launchpad.net/~n-muench/+archive/vlc

(typically when you see an error like "but blah-blah is to be installed", what that means is 'blah-blah' is already installed

If the ppa is still enabled, (doubtful), then run sudo apt-get update

If it's not currently enabled then re-enable or add back, then run above command & you'll be able to install ffmpeg or libav-tools which provides avconv

avconv will be the preferred way to run 'ffmpeg' as sooner or later the ffmpeg binary will no longer be provided in Debian/Ubuntu

If you decide that using backported ffmpeg shared libs isn't what you want then after enabling the ppa run ppa-purge as suggested. (The ppa isn't proving all packages that depend on the shared ffmpeg libs so some apps or plugins could have issues

share|improve this answer
    
I do exactly used VLC 2.0 version PPA. I purged it because it was unable to install some packages to my distro. So you recommend me to install VLC back by adding VLC PPA? ok I will try it right now. –  Nikki Mar 7 '12 at 6:15
    
Thank you very much. You helped me a lot. Never expected that VLC 2.0 version PPA may cause the problems. =) –  Nikki Mar 7 '12 at 6:22
    
For 11.10 there is the videolan stable ppa which provides updated vlc-2.X builds that will not replace your shared 'ffmpeg' (libav) libraries - launchpad.net/~videolan/+archive/stable-daily (if deciding to try make sure the previous ppa is fully purged –  doug Mar 8 '12 at 21:47
add comment

I tried steps given in following link and it works :)

http://ubuntuforums.org/showpost.php?p=5962046&postcount=9

Try

sudo apt-get update

to update your package list. Then

sudo apt-get autoclean

to clean up any partial packages. Then

sudo apt-get clean

to clean up the apt cache.

sudo apt-get autoremove

will clean up any unneeded dependencies.

If while doing this you can identify the broken package this code will very forcefully remove it.

sudo dpkg --remove -force --force-remove-reinstreq <package name>

Change package name to the real name of course.

share|improve this answer
add comment

I've had this happen to me when I've added various PPAs or other deb repositories to my system and it doesn't take a scientist to spot the few instances of ppa in your error content.

My suggestion would be to purge whatever PPA is holding this updated version of ffmpeg (which itself has the unfulfillable dependencies), apt-get update and then apt-get install ffmpeg.

If you're not sure which PPA is providing it, apt-cache policy ffmpeg will show you which versions are available in each of your installed sources.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.