Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

julia says "ffmpeg: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory" #37

Closed
prehonor opened this issue Sep 13, 2020 · 2 comments

Comments

@prehonor
Copy link

[nix-shell:~]$ julia
_
_ _ ()_ | Documentation: https://docs.julialang.org
() | () () |
_ _ | | __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 1.0.4 (2019-05-16)
/ |_'|||_'_| |
|__/ |

julia> using FFMPEG
[ Info: Recompiling stale cache file /home/prehonor/.julia/compiled/v1.0/FFMPEG/TGvga.ji for FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a]

julia> FFMPEG.exe("-version")
/home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/ffmpeg: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
ERROR: failed process: Process(/home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/ffmpeg -version, ProcessExited(127)) [127]
Stacktrace:
[1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at /nix/store/nnjc5x32l9n2kzas0lqazhla88h8sm70-julia-1.0.4/lib/julia/sys.so:?
[2] #run#505(::Bool, ::Function, ::Cmd) at /nix/store/nnjc5x32l9n2kzas0lqazhla88h8sm70-julia-1.0.4/lib/julia/sys.so:?
[3] run at ./process.jl:661 [inlined]
[4] #4 at /home/prehonor/.julia/packages/FFMPEG/guN1x/src/FFMPEG.jl:133 [inlined]
[5] withenv(::getfield(FFMPEG, Symbol("##4#6")){String,Cmd}, ::Pair{String,String}) at ./env.jl:148
[6] #exe#2 at /home/prehonor/.julia/packages/FFMPEG/guN1x/src/FFMPEG.jl:132 [inlined]
[7] #exe at ./none:0 [inlined]
[8] #exe#1 at /home/prehonor/.julia/packages/FFMPEG/guN1x/src/FFMPEG.jl:96 [inlined]
[9] exe(::String) at /home/prehonor/.julia/packages/FFMPEG/guN1x/src/FFMPEG.jl:96
[10] top-level scope at none:0

julia> ldd /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/ffmpeg
ERROR: syntax: invalid identifier name "."

julia>

[nix-shell:~]$ ldd /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/ffmpeg
linux-vdso.so.1 (0x00007ffc7325f000)
libavdevice.so.58 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libavdevice.so.58 (0x00007f9a3bd31000)
libavfilter.so.7 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libavfilter.so.7 (0x00007f9a3ba21000)
libavformat.so.58 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libavformat.so.58 (0x00007f9a3b7ca000)
libavcodec.so.58 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libavcodec.so.58 (0x00007f9a39ced000)
libavresample.so.4 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libavresample.so.4 (0x00007f9a39cca000)
libpostproc.so.55 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libpostproc.so.55 (0x00007f9a39ca8000)
libswresample.so.3 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libswresample.so.3 (0x00007f9a39c88000)
libswscale.so.5 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libswscale.so.5 (0x00007f9a39bfa000)
libavutil.so.56 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libavutil.so.56 (0x00007f9a39b86000)
libm.so.6 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libm.so.6 (0x00007f9a39a46000)
libpthread.so.0 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libpthread.so.0 (0x00007f9a39a25000)
libc.so.6 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libc.so.6 (0x00007f9a39864000)
libass.so.9 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libass.so.9 (0x00007f9a39631000)
libfreetype.so.6 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libfreetype.so.6 (0x00007f9a39382000)
libbz2.so.1.0 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libbz2.so.1.0 (0x00007f9a39172000)
libz.so.1 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libz.so.1 (0x00007f9a38f55000)
libssl.so.1.1 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libssl.so.1.1 (0x00007f9a38cb5000)
libcrypto.so.1.1 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libcrypto.so.1.1 (0x00007f9a387d1000)
libfdk-aac.so.1 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libfdk-aac.so.1 (0x00007f9a38517000)
libmp3lame.so.0 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libmp3lame.so.0 (0x00007f9a38289000)
libopus.so.0 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libopus.so.0 (0x00007f9a3822b000)
libvorbis.so.0 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libvorbis.so.0 (0x00007f9a37ff2000)
libvorbisenc.so.2 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libvorbisenc.so.2 (0x00007f9a37d45000)
libdl.so.2 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libdl.so.2 (0x00007f9a37d40000)
libx265.so.169 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libx265.so.169 (0x00007f9a37647000)
librt.so.1 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/librt.so.1 (0x00007f9a3763d000)
/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/ld-linux-x86-64.so.2 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib64/ld-linux-x86-64.so.2 (0x00007f9a3bd49000)
libfribidi.so.0 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libfribidi.so.0 (0x00007f9a3741c000)
libogg.so.0 => /home/prehonor/.julia/packages/FFMPEG/guN1x/deps/usr/bin/../lib/libogg.so.0 (0x00007f9a37216000)
libstdc++.so.6 => /nix/store/danv012gh0aakh8xnk2b35vahklz72mk-gcc-9.2.0-lib/lib/libstdc++.so.6 (0x00007f9a37036000)
libgcc_s.so.1 => /nix/store/danv012gh0aakh8xnk2b35vahklz72mk-gcc-9.2.0-lib/lib/libgcc_s.so.1 (0x00007f9a3701c000)

help me,please

@SimonDanisch
Copy link
Member

I think, these are the same issues:
JuliaGL/GLFW.jl#198
JuliaLang/julia#34276

@prehonor
Copy link
Author

prehonor commented Sep 14, 2020

I think, these are the same issues:
JuliaGL/GLFW.jl#198
JuliaLang/julia#34276

Thank you ,I find out the issue: old version FFMPEG.jl doesnt take LD_LIBRARY_PATH of the system , so I change it from
const execenv = ("LD_LIBRARY_PATH" => string(libdir1, ":", libdir2, ":", libpath)) to
const execenv = ("LD_LIBRARY_PATH" => string(get(ENV, "LD_LIBRARY_PATH", ""),":",libdir1, ":", libdir2, ":", libpath))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants