Shafic
Shafic

Reputation: 71

cannot start android emulator on AWS linux

Cannot start android emulator on AWS linux .. Getting this exception :

"android-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64: error while loading shared libraries: libpulse.so.0: cannot open shared object file: No such file or directory"

Tried installing pulseaudio package but its not available in aws linux ...

$ sudo yum install pulseaudio Loaded plugins: priorities, update-motd, upgrade-helper No package pulseaudio available. Error: Nothing to do

Complete log :

[ec2-user@ip-**** emulator]$ emulator -list-avds
Nexus26
Nexus6P
Nexus_6_API_26
device25
[ec2-user@ip-**** emulator]$ emulator @Nexus26 -debug-all -debug-no-metrics
emulator:Android emulator version 26.0.3.0 (build_id 3965150)
emulator:Found AVD name 'Nexus26'
emulator:Found AVD target architecture: x86
emulator:argv[0]: 'emulator'; program directory: '/home/ec2-user/android-sdk/tools'
emulator:  Found directory: /home/ec2-user/android-sdk/system-images/android-26/default/x86/

emulator:Probing for /home/ec2-user/android-sdk/system-images/android-26/default/x86//kernel-ranchu: file exists
emulator:Auto-config: -engine qemu2 (based on configuration)
emulator:  Found directory: /home/ec2-user/android-sdk/system-images/android-26/default/x86/

emulator:try dir /home/ec2-user/android-sdk/tools
emulator:try dir .
emulator:Found target-specific 64-bit emulator binary: /home/ec2-user/android-sdk/emulator/./qemu/linux-x86_64/qemu-system-i386
emulator:Adding library search path: './lib64'
emulator:Adding library search path: './lib64/gles_swiftshader'
emulator:Adding library search path: './lib64/gles_angle'
emulator:Adding library search path: './lib64/gles_angle9'
emulator:Adding library search path: './lib64/gles_angle11'
emulator:Adding library search path: './lib64/libstdc++'
emulator: Adding library search path for Qt: './lib64/qt/lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=./lib64/qt/plugins
emulator: Running :/home/ec2-user/android-sdk/emulator/./qemu/linux-x86_64/qemu-system-i386
emulator: qemu backend: argv[00] = "/home/ec2-user/android-sdk/emulator/./qemu/linux-x86_64/qemu-system-i386"
emulator: qemu backend: argv[01] = "@Nexus26"
emulator: qemu backend: argv[02] = "-debug-all"
emulator: qemu backend: argv[03] = "-debug-no-metrics"
emulator: Concatenated backend parameters:
 /home/ec2-user/android-sdk/emulator/./qemu/linux-x86_64/qemu-system-i386 @Nexus26 -debug-all -debug-no-metrics
/home/ec2-user/android-sdk/emulator/./qemu/linux-x86_64/qemu-system-i386: error while loading shared libraries: libpulse.so.0: cannot open shared object file: No such file or directory

Any suggestion how to solve this ?

Upvotes: 7

Views: 2392

Answers (2)

Martin Zeitler
Martin Zeitler

Reputation: 76689

In case of Ubuntu, this would be the i386 package:

sudo apt-get install libpulse0:i386

In case of CentOS, this would be the i686 package:

sudo yum-config-manager --enable epel
sudo yum install pulseaudio-libs.i686

These are usually even available from the base CentOS repository ...

but may have been blacklisted in the /etc/yum.repos.d/ configuration

or are even completely absent from the amzn-main repository.

Upvotes: 0

sktan
sktan

Reputation: 1259

Are you using Amazon Linux 1 or Amazon Linux 2?

The packages enabled by default in Amazon Linux AMIs are limited, but you will be able to extend the packages you can install by enabling the epel repositories:

# Amazon Linux 2
sudo amazon-linux-extras install epel
sudo yum install -y pulseaudio-libs

# Amazon Linux 1
sudo yum-config-manager --enable epel
sudo yum install -y pulseaudio pulseaudio-libs

More information can be found below:

https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-ami-basics.html#extras-library

Upvotes: 0

Related Questions