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

How to solve the problem "Unable to locate package libva1"? #731

Closed
yxdming opened this issue Jul 24, 2019 · 7 comments · May be fixed by #732
Closed

How to solve the problem "Unable to locate package libva1"? #731

yxdming opened this issue Jul 24, 2019 · 7 comments · May be fixed by #732

Comments

@yxdming
Copy link

yxdming commented Jul 24, 2019

When i try to compile the Omxplayer in my raspberry 3b+, i just run the prepare script as the instructions from the README.md.
But I got the following error.
Can anybody explain this.
Thanks.

pi@raspberrypi:~/omxp/omxplayer$ sh prepare-native-raspbian.sh 
Modifying for native build on Debian
Checking dpkg database for missing packages
.................
You are missing required packages.
Run sudo apt-get update && sudo apt-get install  git-core libva1 libssl1.0-dev
pi@raspberrypi:~/omxp/omxplayer$ sudo apt-get update && sudo apt-get install  git-core libva1 libssl1.0-dev
Hit:1 http://archive.raspberrypi.org/debian buster InRelease                                                                     
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease                                                                  
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'git' instead of 'git-core'
E: Unable to locate package libva1
pi@raspberrypi:~/omxp/omxplayer$ sudo apt-get update && sudo apt-get install git libva1 libssl1.0-dev
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease                                                                 
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libva1
pi@raspberrypi:~/omxp/omxplayer$ 

@yxdming
Copy link
Author

yxdming commented Jul 25, 2019

when i excute make ffmpeg make -j$(nproc), I got the error

g++ -pipe -mfloat-abi=hard -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -g -std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG  -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST -I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/freetype2 -isystem/opt/vc/include -isystem/opt/vc/include/interface/vcos/pthreads -c OMXSubtitleTagSami.cpp -o OMXSubtitleTagSami.o -Wno-deprecated-declarations
linux/OMXAlsa.cpp:27:10: fatal error: libavutil/channel_layout.h: No such file or directory
 #include <libavutil/channel_layout.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:49: linux/OMXAlsa.o] Error 1
make: *** Waiting for unfinished jobs....

@jdonald
Copy link

jdonald commented Jul 25, 2019

Edit prepare-native-raspbian.sh and replace it with libva2.

As for missing libavutil, that means your ffmpeg build failed so you need to make clean (which really only does rm -rf ffmpeg), fix things, and rebuild. In fact if you get any errors regarding missing libavutil, libavcodec, libvavformat, or libswscale missing it just means the ffmpeg build failed.

For me, the ffmpeg build can't seem to find smbclient even though I have libsmbclient-dev and smbclient installed, so I ended up editing Makefile.ffmpeg and changing --enable-smbclient to --disable-smbclient. Then everything built.

Whether it runs properly across all formats may be another story. Things are kind of shaky across the board getting LibreELEC, Kodi, OMXplayer, VLC, Chromium, etc. to have H.265 decoding working reliably on the Pi 4. There are likely other problems with the removal of brcmGLES and getting other VideoCore APIs up to speed.

@yxdming
Copy link
Author

yxdming commented Jul 27, 2019

thanks @jdonald
But when i replace libva2 with libra in prepare-native-raspbian.sh , it shows that need to install libssh-dev, but when I install libssh-dev, the libssl1.0-dev had been removed.
That's confused me.

pi@raspberrypi:~/omxp/omxplayer $ sh prepare-native-raspbian.sh 
Modifying for native build on Debian
Checking dpkg database for missing packages
.................
You are missing required packages.
Run sudo apt-get update && sudo apt-get install  libssh-dev
pi@raspberrypi:~/omxp/omxplayer $ vi prepare-native-raspbian.sh 
pi@raspberrypi:~/omxp/omxplayer $ sudo apt-get install libssh-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gyp libboost-system1.62.0 libboost-thread1.62.0 libjs-inherits libjs-is-typedarray libreoffice-gtk2 libssl1.0.2
  libuv1-dev node-abbrev node-ajv node-ansi node-ansi-align node-ansi-regex node-ansi-styles node-ansistyles
  node-aproba node-archy node-are-we-there-yet node-asn1 node-assert-plus node-asynckit node-aws-sign2 node-aws4
  node-balanced-match node-bcrypt-pbkdf node-bluebird node-boxen node-brace-expansion node-builtin-modules
  node-builtins node-cacache node-call-limit node-camelcase node-caseless node-chalk node-chownr node-cli-boxes
  node-cliui node-clone node-co node-color-convert node-color-name node-combined-stream node-concat-map
  node-concat-stream node-config-chain node-console-control-strings node-copy-concurrently node-core-util-is
  node-cross-spawn node-cyclist node-dashdash node-decamelize node-decompress-response node-deep-extend node-defaults
  node-delayed-stream node-delegates node-detect-indent node-detect-newline node-duplexer3 node-duplexify
  node-ecc-jsbn node-editor node-encoding node-end-of-stream node-errno node-escape-string-regexp node-execa
  node-extend node-extsprintf node-find-up node-flush-write-stream node-forever-agent node-form-data node-from2
  node-fs-vacuum node-fs-write-stream-atomic node-fs.realpath node-gauge node-get-caller-file node-get-stream
  node-getpass node-glob node-got node-graceful-fs node-har-schema node-har-validator node-has-flag
  node-has-symbol-support-x node-has-to-string-tag-x node-has-unicode node-hosted-git-info node-http-signature
  node-iconv-lite node-iferr node-import-lazy node-imurmurhash node-inflight node-inherits node-ini node-invert-kv
  node-is-builtin-module node-is-npm node-is-object node-is-plain-obj node-is-retry-allowed node-is-stream
  node-is-typedarray node-isarray node-isexe node-isstream node-isurl node-jsbn node-json-parse-better-errors
  node-json-schema node-json-stable-stringify node-json-stringify-safe node-jsonify node-jsonparse node-jsonstream
  node-jsprim node-latest-version node-lazy-property node-lcid node-libnpx node-locate-path node-lockfile
  node-lowercase-keys node-lru-cache node-mem node-mime-types node-mimic-fn node-mimic-response node-minimatch
  node-minimist node-mississippi node-mkdirp node-move-concurrently node-mute-stream node-node-uuid node-nopt
  node-normalize-package-data node-npm-package-arg node-npm-run-path node-npmlog node-oauth-sign node-object-assign
  node-once node-opener node-os-locale node-osenv node-p-cancelable node-p-finally node-p-limit node-p-locate
  node-p-timeout node-package-json node-parallel-transform node-path-exists node-path-is-absolute node-path-is-inside
  node-performance-now node-prepend-http node-process-nextick-args node-promise-inflight node-promzard node-proto-list
  node-prr node-pump node-pumpify node-punycode node-qs node-qw node-rc node-read node-read-package-json
  node-readable-stream node-registry-auth-token node-registry-url node-request node-require-directory
  node-require-main-filename node-resolve-from node-retry node-rimraf node-run-queue node-safe-buffer node-semver
  node-semver-diff node-set-blocking node-sha node-shebang-command node-shebang-regex node-signal-exit node-slash
  node-slide node-sorted-object node-spdx-correct node-spdx-expression-parse node-spdx-license-ids node-sshpk
  node-ssri node-stream-each node-stream-iterate node-stream-shift node-string-decoder node-string-width
  node-strip-ansi node-strip-eof node-strip-json-comments node-supports-color node-tar node-term-size node-text-table
  node-through node-through2 node-timed-out node-tough-cookie node-tunnel-agent node-tweetnacl node-typedarray
  node-uid-number node-unique-filename node-unpipe node-url-parse-lax node-url-to-options node-util-deprecate
  node-uuid node-validate-npm-package-license node-validate-npm-package-name node-verror node-wcwidth.js node-which
  node-which-module node-wide-align node-widest-line node-wrap-ansi node-wrappy node-write-file-atomic
  node-xdg-basedir node-xtend node-y18n node-yallist node-yargs node-yargs-parser
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libssl-dev
Suggested packages:
  libssh-doc libssl-doc


The following packages will be REMOVED:
  libssl1.0-dev

The following NEW packages will be installed:
  libssh-dev libssl-dev
0 upgraded, 2 newly installed, 1 to remove and 85 not upgraded.
Need to get 0 B/1,782 kB of archives.
After this operation, 1,530 kB of additional disk space will be used.
Do you want to continue? [Y/n] y 
(Reading database ... 148925 files and directories currently installed.)
Removing libssl1.0-dev:armhf (1.0.2q-2) ...
Selecting previously unselected package libssl-dev:armhf.
(Reading database ... 148839 files and directories currently installed.)
Preparing to unpack .../libssl-dev_1.1.1c-1_armhf.deb ...
Unpacking libssl-dev:armhf (1.1.1c-1) ...
Selecting previously unselected package libssh-dev:armhf.
Preparing to unpack .../libssh-dev_0.8.7-1_armhf.deb ...
Unpacking libssh-dev:armhf (0.8.7-1) ...
Setting up libssl-dev:armhf (1.1.1c-1) ...
Setting up libssh-dev:armhf (0.8.7-1) ...
pi@raspberrypi:~/omxp/omxplayer $ vi prepare-native-raspbian.sh 
pi@raspberrypi:~/omxp/omxplayer $ sh prepare-native-raspbian.sh 
Modifying for native build on Debian
Checking dpkg database for missing packages
.................
You are missing required packages.
Run sudo apt-get update && sudo apt-get install  libssl1.0-dev

@jdonald
Copy link

jdonald commented Jul 27, 2019

That isn't related to the libva1 problem. libssh-dev is required for ffmpeg regardless.

As you have a gazillion packages you can get a more complex dependency chain, and this one triggers a preference for SSL 1.1 over 1.0. You should consider cleaning up your packages once in a while, e.g.

sudo apt autoremove

On top of that, you can probably get around this if you also change the script to reference libssl-dev instead of libssl1.0-dev. I doubt omxplayer particularly depends on version 1.0

@yxdming
Copy link
Author

yxdming commented Jul 31, 2019

Thanks @jdonald
I had solved this issue according to your suggestion.
I will mark this issue to closed.

@yxdming yxdming closed this as completed Jul 31, 2019
@boy412
Copy link

boy412 commented Dec 15, 2019

Thank you @yxdming for asking your questions. I had the exact same problem and was able to solve this using the info in this thread. And thank you @jdonald for posting your comments!

@dasl-
Copy link

dasl- commented Apr 17, 2021

In case anyone is still looking, I was able to use the info in this thread to write a script that builds omxplayer: https://gist.github.com/dasl-/75bc55ac15f28a28db2d1f39ef09cd95

dasl- added a commit to dasl-/omxplayer that referenced this issue Nov 10, 2024
dasl- added a commit to dasl-/omxplayer that referenced this issue Nov 10, 2024
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

Successfully merging a pull request may close this issue.

4 participants