0

I'm using Ubuntu 18.04.

Whenever I try to use sudo, I get:

[sudo] password for user: fingerprint-helper: error while loading shared libraries: libaudio.so.2: wrong ELF class: ELFCLASS32

so I cannot use sudo any more as it says:

Sorry, try again.

when I type the password.

How can I restore sudo access without access to sudo?

Note: removing the fingerprint software is an option.

Fabby
  • 34,259
Hasal
  • 1
  • Welcome to [ubuntu.se]. :-) Did you install that file manually? If not, remove the 32-bit version and install the 64-bit version of the package. – Fabby Jul 18 '19 at 22:57
  • @Fabby Thank you but, I installed Fingerprint GUI manually and it worked for more then 2 weeks without any errors. Now I can't remove it because I can't use sudo anymore. – Hasal Jul 19 '19 at 02:36

2 Answers2

1

Depending on what is broken, pkexec may still work even though sudo doesn't. Polkit (of which the pkexec command is a part) and sudo are separate mechanisms in Ubuntu that allow administrators to perform actions as root.

I don't know how you installed the fingerprint software, so I don't know how to remove it. But whatever commands you would run with sudo, you can usually run with pkexec in place of sudo, at least as long as they're not commands that run graphical applications.

That is, instead of running:

sudo some-command...

Run:

pkexec some-command...

Ubuntu users have used pkexec to solve a variety of problems where they couldn't use sudo, including sudo being uninstalled and sudo being misconfigured. But depending on what is broken, it's possible that running pkexec will fail as well; I'm not sure that can be ascertained from the information you've provided (so if it works for you it might not work for people who find this question by searching, or vice versa).

If you are able to run commands as root with pkexec but uninstalling the fingerprint software doesn't fix the problem, the next step would be to look into the file whose name is mentioned in the error message, libaudio.so.2. This file is provided by the libaudio2 package. So if you can run commands as root with pkexec, you can attempt to reinstall that package:

pkexec apt install --reinstall libaudio2

I can't really give any more specific advice than that based on the information available so far. But I can give more general advice: to find official Ubuntu packages that provide a particular file, go to Ubuntu Packages Search and search under where it says "Search the contents of packages." (I mention this for the benefit of others who find this question by searching, but also for you, in case you get additional errors messages after fixing the one you've seen so far.)

Eliah Kagan
  • 117,780
0

Just drop to a root shell prompt and uninstall the fingerprint software from there the same way you installed it.

Then reboot and log on normally and sudo will be back.

Fabby
  • 34,259