Unable to install ffmpeg in rockylinux 9 - docker

I am trying to build a docker image which is based on rockylinux9 and includes an installation of the ffmpeg.
In my dockerfile, I have the following lines for the installation of ffmpeg:
RUN dnf -y install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm && \
dnf -y install ffmpeg
and this is somehow failing with the below error when I try to build the image using:
docker build .
#6 106.4 Error:
#6 106.4 Problem: package ffmpeg-5.1.2-9.el9.x86_64 requires libavfilter.so.8()(64bit), but none of the providers can be installed
#6 106.4 - package ffmpeg-5.1.2-9.el9.x86_64 requires libavfilter.so.8(LIBAVFILTER_8)(64bit), but none of the providers can be installed
#6 106.4 - package libavfilter-free-5.1.2-6.el9.x86_64 requires librubberband.so.2()(64bit), but none of the providers can be installed
#6 106.4 - package ffmpeg-libs-5.1.2-9.el9.x86_64 requires librubberband.so.2()(64bit), but none of the providers can be installed
#6 106.4 - conflicting requests
#6 106.4 - nothing provides ladspa needed by rubberband-3.1.0-2.el9.x86_64
#6 106.4 (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
------
executor failed running [/bin/sh -c dnf -y install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm && dnf -y install ffmpeg --allowerasing]: exit code: 1
Can someone help me with this?
I believe I am supposed to install the ffmpeg dependencies, but I'm not sure how this can be accomplished.

The FFmpeg package is not available in Rocky Linux 9 base repos, you can install it by adding an extra repo. There are package repos and installation files for different distributions at its official address.

I was able to resolve this issue by installing the powertools.
Reference Links:
Rocky Linux Forum - Problem with ffmpeg
Rocky Linux Forum - Installing powertools

Related

How to cross compile a rust project with opencv package for armv7

I have a simple rust application which compiles without errors on my Ubuntu host machine.
The Cargo.toml looks like this:
[package]
name = "openvc-test"
version = "0.1.0"
edition = "2021"
[dependencies]
opencv = "0.66"
Then I tried to cross compile this project for armv7-unknown-linux-gnueabihf, so that I can run the binary on a raspberry. I used the cross tool for this purpose. The FAQ of the cross project has some information about how to handle external libraries. So I tried to install libopencv-dev:armhf on the docker image just like in the examples of the FAQ. However, I get the following error:
The following packages have unmet dependencies:
libopencv-dev:armhf : Depends: libopencv3.2-java:armhf (= 3.2.0+dfsg-6) but it is not installable
Recommends: opencv-data:armhf but it is not installable
I also tried to use Debian repositories as described in the FAQ. The error is the same.
Does anyone have an idea on how to solve this issue? Or is there another way of cross compiling a rust project that I can try?
Compiling on the raspberry does not work, compilation gets stuck at package opencv. I think it is due to the limited performance of the rapsberry?
Installing a precompiled opencv package in the docker container does not work (still don't know why), but cross compiling the correct opencv version does work. See the following docker file:
ARG CROSS_BASE_IMAGE
FROM $CROSS_BASE_IMAGE
# requirements of bindgen, see https://rust-lang.github.io/rust-bindgen/requirements.html
RUN DEBIAN_FRONTEND=noninteractive apt install -y llvm-dev libclang-dev clang
# cross compile opencv, see https://docs.opencv.org/4.x/d0/d76/tutorial_arm_crosscompile_with_cmake.html
RUN DEBIAN_FRONTEND=noninteractive apt install -y gcc-arm-linux-gnueabihf git build-essential cmake
RUN git clone --depth 1 --branch '4.5.1' https://github.com/opencv/opencv.git && \
cd opencv/platforms/linux && \
mkdir build && \
cd build && \
cmake -DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi.toolchain.cmake ../../.. && \
make && \
make install
ENV CMAKE_PREFIX_PATH="/opencv/platforms/linux/build/install"
In Cross.toml you simply specify the path of the dockerfile, e.g.:
[target.armv7-unknown-linux-gnueabihf]
dockerfile = "./Dockerfile"
Cross compiling the Rust project:
cross build --target armv7-unknown-linux-gnueabihf
The initial setup of the docker container takes quite a long time.

Package 'cgroupfs-mount' has no installation candidate

I'm trying to install docker ce on wsl on windows home version 17134.765 (18.3). I'm following the directions in the screenshot after installing wsl with ubuntu 18.04 from https://github.com/Microsoft/WSL/issues/2291#issuecomment-477632663. It seems to be working until the line:
~$ sudo apt -y install cgroupfs-mount
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package cgroupfs-mount is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'cgroupfs-mount' has no installation candidate
How can I get this working?
The same issue. But I found cgroupfs-mount is not necessary. I run the follow command, then start docker successfully!
sudo chmod -R 777 /var/run/docker.sock

Unmet dependencies when installing libboost-all-dev on i386/debian Docker image

I want to dockerize a build environment for Linux i386 targets. I need to install library dependencies such as boost. But I came across this error:
Dockerfile
FROM i386/debian:sid
RUN apt-get update
RUN apt-get -y install libboost1.67-all-dev
But even this simple script failed:
The following packages have unmet dependencies:
libboost1.67-all-dev : Depends: libboost-mpi1.67-dev but it is not going to be installed
Depends: libboost-mpi-python1.67-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I changed to libboost1.67-dev and it worked. I'm not sure what's the difference. If someone knows please explain that to me.
In a similar situation, I found two solutions:
opt.1) sudo apt install <unmet dependencies and sub-dependencies>
this is not straightforward but it should work
opt.2) give up all-dev and install only required packages which may be like
sudo apt install build-essential:i386 libboost-system-dev:i386 libboost-thread-dev:i386 libboost-program-options-dev:i386 libboost-test-dev:i386

Docker on Debian Stretch gnutls_handshake() failed

I'm trying to install docker on my Stretch Debian.
I Followed the guide but when I use "sudo apt-get update" I get :
https://download.docker.com/linux/debian stretch/stable amd64 Packages
gnutls_handshake() failed: Public key signature verification has
failed.
"curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -"
returned OK
This is a known issue on Debian Stretch installations that have been upgraded from Debian Jessie. The issue is described here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834724. As described in the Debian bug report, you can fix this by removing the now obsolete library libgnutls-deb0-28.
If you have been a user of deb-multimedia like I have, removing this particular version of libgnutls is not entirely straight-forward because you probably have a version of librtmp1 from deb-multimedia installed that is newer than what is provided by Debian Stretch and that depends on libgnutls-deb0-28. The solution is to first downgrade librtmp1 to the version provided by Stretch and then remove libgnutls:
sudo apt install librtmp1=2.4+20151223.gitfa8646d.1-1
sudo apt remove libgnutls-deb0-28
If you are using aptitude instead of apt then aptitude will automatically suggest to downgrade librtmp1.

Unmet dependencies when installing OpenCV

I am on ubuntu 12.10 and I want to install OpenCV.
I am following the tutorial on this website and when I try the second step, meaning
sudo apt-get install build-essential checkinstall git cmake libfaac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev texi2html yasm zlib1g-dev
I get the following error message:
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.
libsdl1.2-dev : Depends: libpulse-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I have no idea what this means and how I could solve it.
The message means you are trying to install libsdl1.2-dev, which needs libpulse-dev, but it cannot be installed. Maybe apt could not find libpulse-dev in any of your package repositories.

Resources