Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I am trying to start a program using wine on Ubuntu LTS 12.04 64 bit

When I do this, I get the following error message...

/usr/lib/i386-linux-gnu/pkcs11/ /usr/lib/i386-linux->gnu/pkcs11/ cannot open shared object file: No such file or >directory

When I try to symlink the 64 bit libraries, of course, I get the following...

jackie@jackie-Latitude-E6410:~/tmp/AC$ wine TTG.exe
p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/ 
/usr/lib/i386-linux-gnu/pkcs11/ wrong ELF class: ELFCLASS64
wine: Unhandled page fault on read access to 0x00000000 at address (nil) (thread 0009), 
starting debugger...
err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7bc47aac

Is there a package that installs the 32-bit as well as the 64bit?


Appears to be a bug in Ubuntu w/ 1.4

I used these steps and my application worked

Not sure exactly why but it appears to ignore the error if you use the 1.5.

share|improve this question
I tried updating Rosetta Stone 4.1.10 to 4.1.15 manually using an update patch, and the I got the same error before and after upgrading wine1.4 to wine1.5. It did not really seem to fix anything. Do I have to completely delete the existing wineprefix and create a new one completely? – Subhamoy Sengupta Mar 3 '13 at 10:31

4 Answers 4

up vote 39 down vote accepted

This solution works for Ubuntu 12.04 64bit

I originally had this error:

/usr/lib/i386-linux-gnu/pkcs11/ /usr/lib/i386-linux-gnu/pkcs11/ cannot open shared object file: No such file or directory

Then I did a ln -s link to the 64-bit lib and got this error: /usr/lib/i386-linux-gnu/pkcs11/ wrong ELF class: ELFCLASS64

note: before you start remove the link to the 64bit lib if you created it.


Here is how to fix it. Note I am using Crossover 11.3, which uses wine 1.4 so it should also work for wine users.

Further related information to getlibs can be found here.

1) Install getlibs:

UODATE 3/2013: Download getlibs from

sudo chown root:root getlibs
sudo chmod +x getlibs
sudo mv -n getlibs /usr/local/bin

2) Install the 32bit library:

sudo /usr/local/bin/getlibs -p gnome-keyring:i386

If you got this message error:

Failed to download file

then download the file right here:


and do:

/usr/local/bin/getlibs -i "path-of-the-file"/gnome-keyring_3.4.1-4ubuntu1~precise1_i386.deb

3) Make the symbolic link:

sudo mkdir -p /usr/lib/i386-linux-gnu/pkcs11/ 
sudo ln -s /usr/lib32/i386-linux-gnu/pkcs11/ /usr/lib/i386-linux-gnu/pkcs11/

Now run your Crossover/Wine app and the error is gone.

share|improve this answer
For those having error making the symbolic link make a directory named pkcs11 in /usr/lib/i386-linux-gnu then only you make the symbolic link. I had the same problem before. – user68627 Jun 5 '12 at 20:30
let me suggest to put links in /usr/local/lib/... – rzr Oct 31 '12 at 9:12
getlibs is unnecessary, you can use apt to download (without installing) debs from repositories in your sources.list: apt-get download gnome-keyring:i386. I would provide an answer on how to do fix this using only apt, ar and tar, however I seem to be blocked from answering this question. – Oscar Korz Mar 30 '13 at 21:37
vaab's solution seems so much simpler, and worked for me with 12.04. I suggest trying that first. – Lambart Sep 20 '13 at 20:14
@EricLambart thanks for saving me time – Meredith Dec 31 '13 at 13:09

The solution to this needn't be any more complex than sudo apt-get install libp11-kit-gnome-keyring:i386.

At least this is the case in 13.04 and I see no reason why that wouldn't hold true in 12.04/12.10.

share|improve this answer
I find it odd that the 2 answers above with more votes did not work, did not work in 12.04 through 13.04. But installing the actual package that wine was saying missing as you pointed here worked. Is a shame I had to do the ones mentioned above to then see this answer at the bottom which works. – Luis Alvarado May 29 '13 at 17:01
that package is not available in Ubuntu 12.04. – rik-shaw Aug 7 '13 at 16:24
apt-get install gnome-keyring worked for me, for 64-bit 12.04 – lukewendling Aug 19 '13 at 15:56
Installing libp11-kit-gnome-keyring:i386 does not fix the problem in Ubuntu 13.10 – malisokan Dec 25 '13 at 12:35
Fixed it for me on Ubuntu 14.04 – panmari Apr 22 '14 at 10:45

You probably guessed your needed to get the file /usr/lib/i386-linux-gnu/pkcs11/ This file is part of an i386 ubuntu package which won't install directly on your amd64 system. But you can get it easily:

cd $(mktemp -d)                      ## create and go to a temporary temp dir
apt-get download gnome-keyring:i386  ## download the i386 version of gnome-keyring
ar x gnome-keyring*.deb              ## Uncompress the package
tar xf data.tar.gz
## Finally move the file you need to the desired location:
sudo mv usr/lib/i386-linux-gnu/pkcs11 /usr/lib/i386-linux-gnu/

This has happened to me on a 12.10 with wine-1.5.29, and i386 gnome-keyring version was labeled 3.6.1-0ubuntu1_i386, and this worked for me.

Please note that if these instruction do not fit for you, maybe should you mention your ubuntu release and gnome-keyring version. Thanks !

share|improve this answer
the tar xf data.tar.gz should be tar xf data.tar.xz, at least on my pc... thanks – toto_tico May 17 '13 at 11:09
actually it didn't work, there is no file named usr/lib/i386-linux-gnu/pkcs11 in the data folder. Instead there are two directories in usr/lib: usr/lib/gnome-keyring and usr/lib/ubiquity – toto_tico May 17 '13 at 11:14
@toto_tico: obviously, your gnome-keyring package is not the same as mine. Could you give more information on your Ubuntu release and gnome-keyring version ? I added these information to my answer for you to compare. – vaab May 17 '13 at 13:18
Thanks @vaab. I finally found my solution here. I cannot post the solution because I am new on this community. – toto_tico May 18 '13 at 11:59
Worked for me with 12.04, thanks! – Lambart Sep 20 '13 at 20:14

Another option that worked for me is to simply reinstall libp11-kit0

sudo apt-get install --reinstall libp11-kit0
share|improve this answer
This had no effect for me on Ubuntu 14.10/ – incises Feb 18 at 11:40
Why would you downvote an answer for 12.04, with respect to how it works on 14.10... – Brandon Bertelsen Feb 23 at 18:26

protected by Community Jun 6 '12 at 9:01

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.