Tuesday, January 20, 2015

Running Stata 12 on Ubuntu 14.04 (Trusty Tahr)

After upgrading my linux machine I realized that I could no longer run my copy of Stata 12 GUI. It game the error:
./xstata-se: error while loading shared libraries: libgtksourceview-1.0.so.0: cannot open shared object file: No such file or directory
These older versions of libraries aren't in the normal Ubuntu repositories anymore, so this is a simple work around to get Stata working again. (I'm on a 64 bit machine so change amd64 to the appropriate)
  1. Install libgtksourceview2-2.0
  2. sudo ln -s /usr/lib/libgtksourceview-2.0.so.0 /usr/lib/libgtksourceview-1.0.so.0
  3. Download libgnomecups1.0-1 0.2.3-4 from here. Install it with dpkg.
  4. Download libgnomeprint2.2-data_2.18.8-3ubuntu1_all.deb and libgnomeprint2.2-0_2.18.8-3ubuntu1_amd64.deb from here. Install them at the same time with dpkg.
Happy estimating.

8 comments:

Ufos said...

wow that works! [Xubuntu 14.04]

Unknown said...

This worked for me using Ubuntu 15.04 - thanks a lot!

bequw said...

Minor changes for Debian testing (Stretch):
1) The package is libgtksourceview2.0
3) Install libgnomeprint2.2-0 from wheezy
4) Nothing needed for this.

Unknown said...

I upgraded to 16.04 last week in place (i.e. using Software Updater rather than installing a fresh copy, so all my packages remained intact). Stata GUI worked fine for the first few days, but then failed with the same message from the original post after my 2nd or 3rd reboot:

> error while loading shared libraries: libgtksourceview-1.0.so.0: cannot open shared object file: No such file or directory

I have tried re-installing these libraries following the instructions, but this doesn't seem to be fixing the problem. Does anyone have a fix for 16.04?

Thanks.

Unknown said...

Using libgtksourceview2.0 for step (1) as suggested by bequw worked for me. Thanks!

Unknown said...

I doesn't work for me on 16.04 :(((

Michael said...

Same as Rossa, using bequw's version of step (1) did the job.

(On 16.04).

Unknown said...

Does anyone have a solution for Ubuntu 18.04? I get the same message as before:

/usr/local/stata12/xstata-se: error while loading shared libraries: libgtksourceview-1.0.so.0: cannot open shared object file: No such file or directory

But now the previous solutions don't seem to work, and I can't find a way around this