I'm looking for a simple way to install ffmpeg in a UBI8 (ubi-minimal) docker image.
I tried running in the dockerfile the following:
RUN microdnf upgrade
RUN microdnf install ffmpeg
And I'm getting:
------
> [7/8] RUN microdnf install ffmpeg:
#11 0.375
#11 0.375 (microdnf:1): librhsm-WARNING **: 07:58:19.229: Found 0 entitlement certificates
#11 0.375
#11 0.375 (microdnf:1): librhsm-WARNING **: 07:58:19.230: Found 0 entitlement certificates
#11 0.519 error: No package matches 'ffmpeg'
------
executor failed running [/bin/sh -c microdnf install ffmpeg]: exit code: 1
How can ffmpeg be easily installed on UBI 8?
Note: I tried referring to numerous references on the web that explain how that may be done, such as this one and this as well, but UBI seems to be working differently.
Short answer: you can't...
Even if you enable rpmfusion where ffmpeg is (like shown in the links you pointed to), the SDL2 package, which is a dependency, is not available in the UBI lines (either UBI8 or UBI9). Even adding Epel, CodeReadyBuilder,... SDL2 is the missing item you cannot get.
Closest thing to UBI you will get is through CentOS Stream. This is what I do in many cases where UBI does not not work (and there are a lot...). As it's almost identical to RHEL, people who want support can build from it directly with almost the same Dockerfile.
Now, if you don't distribute what you are building and you have the proper RHEL licences, you can always build your Dockerfile starting from UBI8, register, add ffmpeg (which will work because you will get SDL2 from registered RHEL repos), and unregister. Kind of a Frankenstein image... But if you have RHEL licences and don't intend to distribute, you'd better build a pure RHEL-based container image.
Related
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
I want to create a Docker image in big sur (M1 chip) with the help of visual studio, but I get the following error :
Starting: "docker" exec -i 737ff06a8ab3 /bin/sh -c "ID=.; if [ -e /etc/os-release ]; then . /etc/os-release; fi; if [ $ID = alpine ] && [ -e /remote_debugger/linux-musl-x64/vsdbg ]; then VSDBGPATH=/remote_debugger/linux-musl-x64; else VSDBGPATH=/remote_debugger; fi; $VSDBGPATH/vsdbg --interpreter=vscode --interpreter=vscode"
Error from pipe program 'docker': qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
The first time it works correctly, but the second time the error occurs
how to resolve it
I ran into this issue when my Dockerfile specified a generic image name but installed linux/amd64 software. What occurs in this instance is that you will get an ARM64 (M1) base image (unless you specify a different --platform in your build call), which does not come pre-populated with x86 shared objects.
It will faithfully try to run the x86 (amd64) code through Docker's qemu hypervisor but discover it is missing some basic shared objects that must be architecture-specific.
What this means is that you need to call up your OS package manager and install the x86 shared object packages and make sure they are in your LD_LIBRARY_PATH. The error messages you see will tell you what you need to find.
In my case, using an arm64 image based on ubuntu/debian, I use the 'apt' package manager. In other OS's, you might use 'yum' or 'rpm'. Go to the web site for that OS (e.g. packages.debian.org) and search for your library dependencies in their packages, then specify that in your RUN call to build into the image.
For your error, you are likely looking for 'libc6'. Here's how I loaded it, which is an amd64 cross-compile package:
Example Dockerfile entries:
RUN apt-get update
RUN apt-get install -y wget unzip
RUN apt-get install -y libc6-amd64-cross
RUN ln -s /usr/x86_64-linux-gnu/lib64/ /lib64
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/lib64:/usr/x86_64-linux-gnu/lib"
There may be other libraries you find missing, so you just have to step through it and resolve the missing shared objects.
When I run docker-compose up I'm getting the following error
qemu: uncaught target signal 6 (Aborted) - core dumped
This is happening when docker-compose is running the command bundle install
=> ERROR [5/6] RUN bundle install --jobs 4 --path .bundle/ 4.2s
------
> [5/6] RUN bundle install --jobs 4 --path .bundle/:
#10 4.170 Fetching gem metadata from https://rubygems.org/.[BUG] Segmentation fault at 0x0000418f81e2b0
#10 4.177 ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-linux]
#10 4.177
#10 4.177 SEGV received in SEGV handler
#10 4.178 -- Control frame information -----------------------------------------------
#10 4.178 SEGV received in SEGV handler
#10 4.178 SEGV received in SEGV handler
#10 4.178 qemu: uncaught target signal 6 (Aborted) - core dumped
#10 4.192 Aborted
------
executor failed running [/bin/sh -c bundle install --jobs 4 --path .bundle/]: exit code: 134
According to this github issue thread on docker's github – its a qemu related bug:
https://github.com/docker/for-mac/issues/5148#issuecomment-784992663
It mentions that qemu is the upstream component Docker use for running Intel (amd64) containers on M1 (arm64) chips. I checked the qemu repo fora related issues with no luck:
https://gitlab.com/qemu-project/qemu/-/issues?scope=all&utf8=%E2%9C%93&state=opened&search=uncaught+target+signal+6
In my docker-compose file I've passed the following config which helped me fix a couple M1 related issue on docker. But this isn't working for this specific issue.
web:
platform: linux/amd64
...
This issue is happening on the following environment
Macbook Pro M1 2020
Mac OS Big Sur 11.2.3
docker-compose version 1.29.1
docker engine: 20.10.6
docker desktop 3.3.3(64133)
I've also opened an issue on qemu repo as well:
https://gitlab.com/qemu-project/qemu/-/issues/340
Any ideas on how to fix this?
I found a hack. This is a way around that specific issue. I fixed it by adding the following line at the top of my Dockerfile.yml to update the image source which might have been outdated
FROM ruby:2.3.4
If you're experiencing a similar issue with another library I suggest looking for an image on Docker Hub https://hub.docker.com/ and making sure that they have support for the desired architecture: amd64 or arm64, etc...
For more information about the qemu error, you can follow this GitLab issue thread: https://gitlab.com/qemu-project/qemu/-/issues/340
Just thought I'd add a discussion point since this is the first thing that comes up on Google.
We're using Fullstaq Ruby jemalloc as our base image and unfortunately there isn't an ARM build of Fullstaq Ruby. Changing our Dockerfile to use a Dockerhub base image appears to solve the issue.
Switching
FROM quay.io/evl.ms/fullstaq-ruby:2.7.6-jemalloc-buster-slim
to
FROM ruby:2.7.6-slim-bullseye
Seems to do the trick.
Hellow everyone,
I have recently downloaded gazebo 11 and ROS melodic but whenever I go to launch my robot application, I get the following error.
... logging to /home/home/.ros/log/77df126e-778d-11ea-87b5-363bebb00921/roslaunch-home-H110M-S2-4832.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
Resource not found: simple_arm
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/opt/ros/melodic/share
The traceback for the exception was written to the log file
I even tried
sudo apt-get install ros-melodic-gazebo-ros-control
but it didnt work.It says it depends on gazebo 9 but how can Imake it work for gazebo 11
In Melodic the default gazebo-ros-control is for Gazebo9. If you want to use Gazebo11 with Melodic you have to install the corresponding gazebo11-ros-control package like this:
$ sudo apt install ros-melodic-gazebo11-ros-control
Other relevant packages (if not installed automatically as dependencies)
ros-melodic-gazebo11-ros
ros-melodic-gazebo11-msgs
ros-melodic-gazebo11-plugins
ros-melodic-gazebo11-ros-pkgs
ros-melodic-gazebo11-dev
Read more under Gazebo 11.x series series here http://gazebosim.org/tutorials?tut=ros_wrapper_versions&cat=connect_ros.
Note! Remember to remove Gazebo9 first and also ros-melodic-gazebo-ros-control, else you may get an error from apt.
Setup your computer to accept software from packages.osrfoundation.org
Usually you only get the first release of Gazebo on the ROS distribution e.g. 9.0 or 11.0. If you want minor updates such as 11.3 as of writing, then add packages.osrfoundation.org to your package repo as per the guide here http://gazebosim.org/tutorials?tut=install_ubuntu&cat=install
Usually you just have to do the following to get the newest Gazebo updates:
$ sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
$ wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
$ sudo apt update
I want to install MongoDB C++ Driver, so first is mongocxx
I follow this installation:
http://mongocxx.org/mongocxx-v3/installation/
but I can not pass step 4
when I run this in mongo-cxx-driver/build
sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
it shows
-- Auto-configuring bsoncxx to use MNMLSTC for polyfills since C++17 is inactive
CMake Error at src/mongocxx/CMakeLists.txt:37 (find_package):
By not providing "Findlibmongoc-1.0.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"libmongoc-1.0", but CMake did not find one.
Could not find a package configuration file provided by "libmongoc-1.0"
(requested version 1.13.0) with any of the following names:
[![enter image description here][1]][1]
libmongoc-1.0Config.cmake
libmongoc-1.0-config.cmake
Add the installation prefix of "libmongoc-1.0" to CMAKE_PREFIX_PATH or set
"libmongoc-1.0_DIR" to a directory containing one of the above files. If
"libmongoc-1.0" provides a separate development package or SDK, be sure it
has been installed.
second question,
Step 2: Choose a C++17 polyfill how can I set MNMLSTC/core?
does anyone can help me,I already trap here for a long time ?
my env:
mongo-c-driver 1.15.1
libmongoc-1.0
mongocxx-3.4.x
Cmake is complaining about not finding a package configuration file (xxx.cmake), probably because you didn't build libmongoc/libbson.
I've tried to reproduce your issue and hit the same problem when I only installed them (apt-get install), so my suggestion is that you get the sources and build them as described at: http://mongoc.org/libmongoc/current/installing.html
Here's the list of commands (with the latest version of mongo-c-driver=1.15.1) which I just tried and worked fine:
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.15.1/mongo-c-driver-1.15.1.tar.gz
tar xzf mongo-c-driver-1.15.1.tar.gz
cd mongo-c-driver-1.15.1
mkdir cmake-build
cd cmake-build
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
make
sudo make install
At this point you can go back into mongocxx/build and run again the command you were stuck at:
cd ../../mongo-cxx-driver/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..