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
         fi

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

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.

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

  1. Thanks — your fix saved me from a lot of useless reinstallations :)

  2. DUDE!

    I’ve been installing fedora 7 – added Adobe7 – and I have a major headache for it!
    The asterisk thing works like a champ!

    YOU ROCK!!!!!!!!!!
    YOU ROCK!!!!!!!!!!
    YOU ROCK!!!!!!!!!!

    Thanks bigtime!
    -REB

  3. So thank you!!! I really tried to do a lot of things trying to fix this error. but the solution was pretty easy, just I add an “*” in the shell script (in my case it is in /usr/local/Adobe/Acrobat7.0/bin) and all my problems disappear.
    Thanks again!

    Abner.

  4. Why aren’t they republishing a working version ?!

  5. YOU ROCK!!!!!!

    What is the matter with Adobe for letting a bug like that out the door?????

  6. You rock!! We switched to kpdf already! But his is good.
    YOu rock!!

  7. please help me
    I followed your suggestion and now when type acroread kpdf appear! I unistalled both acroread and kpdf but the problem is keeping across
    thank in advace fot the help

  8. giovanni:
    Just edit your $HOME/.bashrc file and zap the line containing “alias acroread=kpdf”. That one replaces all acroread invocations with kpdf. As for myself… I’ll stick with kpdf for now ;-)

  9. Thank you very much. Your points on Adobe Reader are well taken and I will have to check out KPDF in the near future. For now, thanks for getting this working.

  10. WOW!! I was tearing my hair out. Many, many thanks Javier. Will look at kpdf
    Thanks again

  11. Thanks for that. Ace tip, worked straight away.
    Why can’t Adobe just fix it themselves.

  12. Thanks from Germany.
    The asterisk solved my problem.
    Great Work.

  13. Wow! This is awesome, and worked! I also (like John Smith) can’t believe they missed this. Especially when it’s more or less correct on a previous line.

  14. Thanks, saved my day. I have googled with the following phrase and this page was the first one.
    acrobat reader linux “expr: syntax error”

  15. Javier,

    Great fix.

    But, don’t sell XPDF to short. I recently upgraded to xpdf-3.02 and I find that it renders better than kpdf and is faster than either acroread or kpdf.

    Cheers,
    William

  16. Thanks, Great tip. No mention of this on Adobe’s site anywhere.

  17. Hi and thanks a lot!!!

    I put in place your modification and it was working till yesterday.

    I’ve updated the libgtk and maybe the regexpr it’s not right anymore.

    Could you please give me an hint to fix it again?

    these are the installed libraries:

    ls -la /usr/lib/libgtk-x11-2.0.*
    -rw-r–r– 1 root root 828 Jul 27 13:19 /usr/lib/libgtk-x11-2.0.la
    lrwxrwxrwx 1 root root 26 Jul 30 08:50 /usr/lib/libgtk-x11-2.0.so -> libgtk-x11-2.0.so.0.1106.0
    lrwxrwxrwx 1 root root 26 Jul 30 07:38 /usr/lib/libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.1106.0
    -rwxr-xr-x 1 root root 3972072 Jul 27 13:19 /usr/lib/libgtk-x11-2.0.so.0.1106.0

    Thanks, thanks, thanks again.

  18. Thank you very much!

    Well done!

    I’ve had problems with gentoo 2007.0 and Acrobat 7 and the asterisk was the key.

  19. Wow. It’s already August, and still they haven’t published a fix. THanks for the post!!

    I also agree about the stupid Yahoo Bar. But, I just went to View -> Toolbars and removed the “search the internet” toolbar. Wasn’t a big deal to me.

    Kudos to your post!

    Aaron

  20. Nice that your site came up first because it solved my problem immediately. Thanx alot.

  21. Excellent quick Fix!

    Now Acrobat work well on my slackware 12!

    Thanks!

  22. Thank so very much!

    That one asterix only, unbelievable. I would never have found that one myself. It worked the same in the Dutch version, similar error I guess (I am a Dutchman).
    I run Slackware 12. I modified the script with Kate, starting it up in a terminal with kdesu kate to give me root rights. I am no good with Vi ..

    Just

  23. Dude,

    This is cool. Quick fix within seconds. Adobe can look like a professional organization with your help, and of course Google’s too (How else would I have found you ?)

  24. And another thank you. My Adobe Reader was working fine until today. I’ve just “upgraded” some packages and it would not launch. All it took was an asterisk. Is this Adobe’s fault? And how did you work out the fix?

    It’s still the reader I prefer to use. I usually have several documents open at a time and I really like having just one window.

  25. Hi, thank you for this fix. Hm, Adobe must be aware of this problem and they are still distribute such buggy version… ;(

  26. Thanks !!!!!
    Saved my neck and hours of reinstallation
    ==k

  27. I did differently: this is what I suggest

    1) open firefox
    2) click preferences
    3) click Content
    4) do nothing (I typed an extra line by mistake)
    5) click File Types, How …. (ie. the last clickable button)
    6) select adobe reader (ie deselect plugin..)
    6) pretend that you are happy (ie say OK)
    7) open a pdf file over internet (anywhere it did not work so far)
    8) you are asked open or save: before saying open, click the button mandating to use this program (ie acroread) to open always such files
    9) open the file
    and that’s it (it will always work, ie until the next upgrading at least.

Comments are closed.