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. Yasuo says:

    Hi All!

    Downloaded 7.0.9, and recognized, that Adobe distributes the package with acroread script patched as you mentioned above. And the script does not work. So I had to investigate further. The solution is simple. You have to delete all lines of function check_gtk_version_and_set_lib_path() between the opening and closing brackets:

    gtk_version_and_set_lib_path() {
    return 1

    It works for me, without any annoying error or warning messages. Hope this helps.

    Good luck,


  2. mahesh says:

    Its great and good tip.

  3. xian says:

    Wow, you just became my personal hero.

  4. I have a dell computer and it came with adobe reader and it worked good until now I don’t know what happened,Maybe when I did some upgrades or something, but never the less it does not work now. IS there an reinstall or a fix that I can do. When I open it, It is just blank and will not let me accept the agrement. What can I do to fix this. oh I have windows xp. Thanks Patty

  5. 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’

  6. name goes here says:

    Awesome ! That ! Works ! You ! Rock !

  7. sandrar says:

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

2 Pings/Trackbacks for "Fix Adobe Acrobat Reader’s “expr: syntax error” message"
  1. […] one I liked more, was at Javier Arturo Rodríguez weblog and is mirrored in here for security (and easy access and remembering) […]

  2. […] 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 […]