Fix Adobe Acrobat Reader’s “expr: syntax error” message

After I upgraded a few system libraries Adobe Acrobat stopped working and started to print an endless lethany of “expr: syntax error” messages. A quick google search later I found the fix detailed in at least a couple of places: Find acroread (it’s a shell script, probably in /usr/local/bin or under whichever-directoy-you-specified-during-installation/bin) and apply this patch:

— acroread.old        2007-06-01 18:18:49.000000000 -0500
+++ acroread    2007-06-01 18:20:57.000000000 -0500
@@ -415,7 +415,7 @@
            return 1

-               echo $mfile| sed ‘s/libgtk-x11-\([0-9]*\)\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g’
+               echo $mfile| sed ‘s/libgtk-x11-\([0-9]*\)\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g’
         return 0

Or just fire up vi(1) and add an asterisk after the second [0-9] block in line 418.
Even tough the problem has been solved, now this is kind of moot. See, I’d rather use acroread than xpdf any day because its navigation is a lot more natural than xpdf’s, and just to be honest xpdf is showing its age and is just plain ugly. However Adobe is starting to piss me off with its inclusion of the Yahoo toolbar in Acrobat Reader and its pitiful insistence to install n upgrades every single freaking time I open a PDF file. So I’ve started to use kpdf instead which feels a bit slower but starts up in a blink, looks a lot cleaner, doesn’t include spyware and displays the PDFs I’ve fed to it with decent antialiasing.

$ echo “alias acroread=kpdf” >> $HOME/.bashrc

So -just to be clear- in my opinion the best way to fix this problem is to stop using acroread and just use something else. Adobe: thank you for screwing up one of your nicer products, and see you never.

Posted in General
53 comments on “Fix Adobe Acrobat Reader’s “expr: syntax error” message
  1. c516a says:


    [root@dhcppc0 ~]# which acroread
    [root@dhcppc0 ~]# vi /usr/bin/acroread

    Go to line 417,
    echo $mfile| sed ‘s/libgtk-x11-\([0-9]*\)\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g’

    In this line, after second [0-9] add a “*”. ( ie, [0-9]* ).


    echo $mfile| sed ‘s/libgtk-x11-\([0-9]*\)\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g’

  2. name goes here says:

    Awesome ! That ! Works ! You ! Rock !

  3. sandrar says:

    Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

6 Pings/Trackbacks for "Fix Adobe Acrobat Reader’s “expr: syntax error” message"
  1. [...] Fix Adobe Acrobat Reader’s “expr: syntax error” message [...]

  2. [...] I recently installed Adobe’s Acrobat reader on xubuntu and ended up getting stuck in a slew of “expr: syntax error” messages. Simple fix go here [...]

  3. [...] released some updates for libgtk-x11 a few days ago and acroread was now failing. Fortunately, the fix is trivial and acroread (and Firefox using the Adobe plugin) is working fine again! So if you are running [...]

  4. [...] acroread from the console and I received the error. After some searching my first hit lead me to a website who had the simpelest patch for it. Just replace the line on 418 echo $mfile| sed [...]

  5. [...] one I liked more, was at Javier Arturo Rodríguez weblog and is mirrored in here for security (and easy access and remembering) [...]

  6. [...] mencari bantuan lewat Google, saya mendapat petunjuk dari sini. Rupanya bukan cuma saya yang mengalami error ini, banyak orang yang mengalami hal yang sama. Untuk [...]

About me

I am a certified Software Architect, System Administrator, Entrepreneur and Open Data advocate, with 19 years experience building Internet-enabled software, from electronic banking to B2B marketplaces.
If you want to use the Internet as a competitive advantage, look at my resume for more information or hire me.