1

Situation:

Almost the same question as Installing php7 on alpine: missing libcrypto and libssl

However, as the latest comment said:

Now that several years have gone by, all of the answers above are invalid, and there does not seem a stable solution to the problem.

Details:

I tried to install in my alpine the ffmpeg over via community repositories with:

apk add ffmpeg

But I got the following errors:

ERROR: unable to select packages:
  so:libcrypto.so.3 (no such package):
    required by: libsrt-1.5.1-r0[so:libcrypto.so.3]

I've done apk add libcrypto3, and also apk add libressl3.5-libcrypto as per that Q&A, but the problem persisted.

My alpine is alpine v3.16.

Updates:

Someone suggested apk add ffmpeg=5.0.1-r1 for alpine v3.16, but I'm getting:

% apk search ffmpeg
ffmpeg-5.1.2-r1

% apk add ffmpeg=5.0.1-r1
ERROR: unable to select packages:
  so:libmbedcrypto.so.7 (no such package):
    required by: librist-0.2.7-r0[so:libmbedcrypto.so.7]
  so:libcrypto.so.3 (no such package):
    required by: libsrt-1.5.1-r0[so:libcrypto.so.3]
  so:libdav1d.so.6 (no such package):
    required by: ffmpeg-libs-5.1.2-r1[so:libdav1d.so.6]
  ffmpeg-5.1.2-r1:
    breaks: world[ffmpeg=5.0.1-r1]
xpt
  • 1,182
  • 2
  • 13
  • 32
  • When you say "via community repositories", do you _only_ have the `community` repository enabled in `/etc/apk/repositories` (i.e. no `main` repository)? If so, then it's no wonder it fails. Testing `apk add ffmpeg` works without issues on a standard Alpine Linux 3.16 system. Tested separately and also via `docker run --rm -it alpine:3.16 apk add ffmpeg`. Compare that with e.g. `docker run --rm -it alpine:3.16 sh -c 'sed -i "/main\$/d" /etc/apk/repositories; apk add ffmpeg'`. – Kusalananda Nov 09 '22 at 11:36
  • @xpt Your apk search shows version 5.1.2-r1 is available but you tried to install 5.0.1-r1 ; note the version difference. – zaTricky Dec 02 '22 at 13:34
  • _"Someone suggested"_ @zaTricky – xpt Dec 02 '22 at 17:16
  • @xpt Yes, one of the answers has a search where they found that version. If someone else comes along and sees my comment they will likely install what is actually available rather than blindly copy/pasting without reading what their search results say. – zaTricky Dec 03 '22 at 18:13

1 Answers1

1

Confirming Alpine version:

# grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Alpine Linux v3.16"

Confirming default repos:

# cat /etc/apk/repositories
https://dl-cdn.alpinelinux.org/alpine/v3.16/main
https://dl-cdn.alpinelinux.org/alpine/v3.16/community

Confirm available version:

# apk search -x ffmpeg
ffmpeg-5.0.1-r1

Install using:

# apk add ffmpeg=5.0.1-r1
ostergaard
  • 134
  • 5
  • @Kusalananda it is an answer for some, does not mean it will work for everybody. Which is a property no answer possesses, as perfectly demonstrated by this very site on a daily basis. :) Looks likely xpt is not actually on v3.16. See my updated answer. – ostergaard Nov 09 '22 at 11:14
  • Indeed! my Alpine is in fact of node:16-alpine docker image which I thought to be v3.16 but v3.15 instead. Following your advice I'm able to install ffmpeg now. thx!! – xpt Nov 09 '22 at 15:46
  • @xpt Did you _change_ anything in the default `node:16-alpine` image? Just running `apk add ffmpeg` in it seems to be working without issues. I'm asking because it would be nice if the answer actually diagnosed the _issue_ that stops you from installing `ffmpeg`. – Kusalananda Nov 09 '22 at 18:19
  • Thanks @Kusalananda, appreciate the effort! However, I scrolled back and checked but it was so long ago that the log has scroll off my 9000 lines of history. So the following is me trying to reconstruct what was happening based on my best guess. First of all & most importantly, following ostergaard's advice I'm able to install ffmpeg now, in the default node:16-alpine image. Now, as to what happened, most likely to be like this: because Alpine is very new to me, so... – xpt Nov 09 '22 at 22:12
  • 1
    Now, as to what happened, most likely to be like this: because _Alpine is very new to me_, so I searched where ffmeg is, and found it is not in main, but in community repositories. So I added the community repositories _myself_, and most likely I've added the edge community repositories, based on my reconstruction, and that's where the problem was, I now believe. appreciate your effort of trying to get the record straight! – xpt Nov 09 '22 at 22:17