2

I installed a package (don't remember which one but that shouldn't be too important) and needed "the real" ffmpeg so I purged the debian package for ffmpeg and installed the other version manually.

The problem is that I now can't install or update any packages without aptitude telling me that xyz package requires ffmpeg which is not being installed. However, since the package is installed all the programs that depend on it work just fine. I don't want to overwrite the version I have with the repository version, I just want to tell aptitude that ffmpeg really is installed.

I've tried apt-mark but because aptitude doesn't think it's installed it won't mark it manual.

As requested apt-cache policy ffmpeg shows:

ffmpeg:
  Installed: (none)
  Candidate: 7:3.2.10-1~deb9u1~bpo8+1
  Version table:
     10:2.6.9-dmo1 0
        100 /var/lib/dpkg/status
     7:3.2.10-1~deb9u1~bpo8+1 0
        100 http://http.debian.net/debian/ jessie-backports/main amd64 Packages

I'm still very much interested in a solution but I decided that I would just install the repository version and then reinstall the version I want. Aptitude did "install" ffmpeg but it didn't overwrite my current version (maybe it put it in a different spot or maybe it saw a "newer" version).

  • Can't you install it with a non-official repository? – pfnuesel Mar 2 '18 at 18:18
  • Maybe but that's a separate thing. I installed it with dpkg but for whatever reason it's not being seen. – user1794469 Mar 2 '18 at 18:25
  • Same as localinstall on yum? – Kevin Lemaire Mar 2 '18 at 19:04
  • 1
    What does apt-cache policy ffmpeg output? – Stephen Kitt Mar 2 '18 at 19:05
4

It is not recommended to install random packages with dpkg.

Read the whole answer before taking any action

Apt is having an issue because it has not associated with your install of ffmpeg. As far as it is concerned you do not have ffmpeg installed and is giving you the above error because of this. Your output of apt-cache policy ffmpeg proves this. I am not aware of methods to associate a random .deb file with apt unless your package sets up apt during its install process. If someone can correct me about this, I would greatly appreciated it. If you need a package that is not available in you current repositories, you can, at your own discretion, add testing/unstable/backports/whatever repository to your sources.list that has the package you are looking for and use the package manager.

I do not recommend you use an unofficial Debian repo.

Look up the available versions of ffmpeg here. If the version you want is in a repo other than stable you should then add it to your sources.list. If you set up "Apt Pinning" you can manage multiple releases of Debian with little overhead. To fix your installation of ffmpeg start by removing your current instance so we can start from scratch.

apt-get purge ffmpeg
dpkg --purge ffmpeg
dpkg -l | ffmpeg

This purges ffmpeg and then looks to see if it is installed. You should be looking for an rc status as per this post. You can then follow the guide in the wiki about apt pinning to add testing and unstable repos. Do not forget to create the files in /etc/apt/sources.list.d/ for each repo you plan on using, and a corresponding /etc/apt/preferences.d/ file. Once you have created the proper files to get set up with apt pinning you can then simply run:

apt-get install ffmpeg/unstable

To install ffmpeg from the unstable repo. You can substitute unstable with whatever repo your desired package is from if you set up apt pinning.

However if you absolutely must use an unofficial Debian repo

Here is a guide to add a third-party repo that contains the ffmpeg package you a probably looking for. If you decide to go with apt pinning you will need to create the repo (/etc/apt/sources.list.d/deb-multimedia.list) and preferences (/etc/apt/preferences.d/deb-multimedia.preferences) instead. Complete the following steps after purging ffmpeg in the manner described previously.

nano /etc/apt/sources.list

Add this line:

deb http://www.deb-multimedia.org stretch main non-free

Save and exit. Now follow these steps:

apt-get update

The “-oAcquire::AllowInsecureRepositories=true” option is mandatory since Buster and thus also needed for unstable.

apt-get update 

-oAcquire::AllowInsecureRepositories=true

apt-get install deb-multimedia-keyring 

-oAcquire::AllowInsecureRepositories=true

Since Squeeze you can install this package with apt-get. Simply press y when the package ask what to do (don't press return).

If apt-get can not find the new key, do that :

wget http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
sudo dpkg -i deb-multimedia-keyring_2016.8.1_all.deb

You can verify the package integrity with:

sha256sum deb-multimedia-keyring_2016.8.1_all.deb
9faa6f6cba80aeb69c9bac139b74a3d61596d4486e2458c2c65efe9e21ff3c7d deb-multimedia-keyring_2016.8.1_all.deb

Final and mandatory step.

An apt-get update and apt-get dist-upgrade to install all packages related to ffmpeg.

After that you can run apt-get install ffmpeg and you should have the correct package.

Conclusion

I understand this covers a lot but I wanted to be comprehensive. My personal philosophy with administrating Debian is to not stray from stable if possible, not stray from official repos with properly set up apt pinning according to the Debian wiki, and to carefully limiting and managing anything from a .deb or installed from source. If you can help prevent there from being conflicts between versioning of packages/libraries by having everything you possibly can be managed by apt you should be safe.

Sorry if this is too long winded or not what you needed I just wanted to make sure I covered all the bases. Best of Luck!

  • 1
    The above answer references a command apt-aget that I cannot find anywhere. Is that a typo? – Digger Apr 25 at 16:55
  • 1
    @Digger yes that would be a typo from my source deb-multimedia.org. I can edit it out. – kemotep Apr 25 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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