ALVR: libavcodec.so.58 on Ubuntu 20.04 LTS can't be found
Please follow the general troubleshooting steps first:
- I carefully followed the instructions in the README and completed successfully the setup wizard.
- I read the ALVR Wikis here and here
If your issue is about games not working, please open an issue for every game and list the game in the title.
Bug reports:
When trying to figure out why I couldn’t connect my headset when it paused on “The stream will begin soon”, I looked into vrserver.txt to find that the following message jumped out at me.
Fri Nov 26 2021 16:43:49.058711 - alvr_server: error in encoder thread: failed to load libavcodec.so.58
As a result, I tried to do several things to try and remedy this.
- I tried to install the appropriate libavcodec packages to see if that would solve this. It still couldn’t find the library.
- I tried to use the ALVR dashboard to register the drivers and saw that
/usr/lib64/alvr
was added. It still couldn’t find the library - As a last resort, I added the folder
/usr/lib64/alvr
to path and ranldconfig
and that still didn’t work.
I can’t seem to figure out why it can’t find it and I don’t really know anything about how plugins interact with Steam.
Environement
What hardware do you have: CPU, GPU, Audio
- AMD® Ryzen 5 2600
- NVIDIA Corporation TU116 [GeForce GTX 1660]
- (The audio isn’t relevant)
What version of ALVR and SteamVR have you tried.
- SteamVR 1.20.4
- ALVR server v16.0.0
Do you have the latest Windows updates? Run “winver” in Windows 10 to get the version number
- I’m running Ubuntu 20.04 LTS
Features:
Please note by far the quickest way to get a new feature is to file a Pull Request.
We will consider your request but it may be closed if it’s something we’re not actively planning to work on.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 19 (1 by maintainers)
Running Ubuntu 20.04 LTS, with Oculus Quest 1, NVidia RTX 2060. I found the same error “failed to load libavcodec.so.58”. Digging a bit deeper, I ran:
ldd /usr/lib64/alvr/libavcodec.so.58
and noticed libx264.so.160 => not found libx265.so.192 => not foundThe libraries included with this Ubuntu release are: libx264.so.155 => /lib/x86_64-linux-gnu/libx264.so.155 (0x00007f1776581000) libx265.so.179 => /lib/x86_64-linux-gnu/libx265.so.179 (0x00007f1775613000)
So that tells me I need newer libraries to work with the libavcodec alvr bundles.
I manually downloaded: http://archive.ubuntu.com/ubuntu/pool/universe/x/x265/libx265-192_3.4-2_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/x/x264/libx264-160_0.160.3011+gitcde9a93-2build1_amd64.deb Extracted them with
ar x [file.deb]
and thentar xvf data.tar.xz
Copied libx264.so.160 and libx265.so.192 to /usr/lib/x86_64-linux-gnu Ran ldconfig. Looking back I suppose I could have just used dpkg and installed the packages, but I first tried placing just the library files into /usr/lib64/alvr with the others. That didn’t work so I copied them to the system-wide directory.Restarted alvr and it worked. Sort of. The h265 codec just looks like smeared blocks of random grey. Using h264 is functional, especially once I switched to a wired USB connection. And I had to turn off foveated rendering because the outside areas were all stretched incorrectly.
Guessing you have a Nvidia gpu if so clone the v16 release and follow the build and run instructions, as rn Nvidia GPUs can only use software encoding which is broken on the git / nightly releases. Also that normal again if you have a Nvidia gpu
Just got my Quest today and had the same issue as described here; first the libraries missing and then the VAAPI failing because of NVidia.
Hope the software encoding can be fixed in the build as well as full support for Nvidia
@ColdIce1605 thanks i have indeed a Nvidia GPU. That sucks, will there be support for Nvidia someday, or is the only way getting an AMD card? (Which i’m planning to get anyway.)
Hello @xytovl , same issue here, this is the content of ~/.config/openvr/openvrpaths.vrpath