javier arturo rodríguez

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

20070601 17:39 by javier

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.

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

  1. Julian Dunn’s Journal » fixing Adobe Acrobat Reader’s “expr: syntax error” message Says:

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

  2. jody Says:

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

  3. RedEyeBlind Says:

    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

  4. Tom Curl Says:

    A fine job Javier!

    Thanks,

    Tom

  5. Acknerss Says:

    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.

  6. Amir Says:

    Why aren’t they republishing a working version ?!

  7. david Says:

    YOU ROCK!!!!!!

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

  8. krasny Says:

    Thanks! adobe products on linux sucks, other succesful case.

  9. sam Says:

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

  10. giovanni Says:

    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

  11. javier Says:

    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 ;-)

  12. Femo Says:

    Thanks for this fix. It was very helpful

  13. Domtor0 Says:

    Jolie boulot!!! (in french dans le texte;)

  14. Andy H. Says:

    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.

  15. Tom Brown Says:

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

  16. John Smith Says:

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

  17. HigorC Says:

    Thanks from Brazil dude

  18. Benjamin Says:

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

  19. indro Says:

    Thanks for the acroread fix.

  20. tubaplayer Says:

    And another satisfied customer :)
    Thanks!!

  21. david Says:

    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.

  22. Express Block » Fix Adobe Acrobat Reader’s “expr: syntax error” message Says:

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

  23. Ahmed Khan Says:

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

  24. William Says:

    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

  25. David Heller Says:

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

  26. Shine Says:

    Great! very useful tip.

    Shine

  27. Antenore Says:

    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.

  28. wizard Says:

    You’re a great!

  29. Juan Says:

    Thank you very much!

    Well done!

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

  30. Aaron Says:

    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

  31. Greg Says:

    Thanks once more!

  32. Justin Says:

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

  33. baja2k2 Says:

    Excellent quick Fix!

    Now Acrobat work well on my slackware 12!

    Thanks!

  34. Just Vecht Says:

    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

  35. Ranjith Says:

    Thanks
    i got worked
    …Fine on Acroread
    Thanks lot

  36. Phillistine Says:

    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 ?)

  37. Gus Heinrich Says:

    Javier,

    Well done.

    Thank you a lot dude.

  38. Neo Says:

    Hi

    Another easy fix … This will fix firefox error also …

    http://www.tecpages.com/expr-syntax-error-adobe-acrobat-reader-acroread-and-mozilla-firefox-mozilla-firefox/

    Thanks

  39. Marc Says:

    Good Job.

    Thanks Alot

  40. Terry Says:

    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.

  41. Hamster Says:

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

  42. Schedar Says:

    Hi!

    Great work, it was very useful, you saved me lot of time.

    Thanks a lot!

  43. libgtk-x11, acroread and Firefox « LpSolit’s blog (original, isn’t it?) Says:

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

  44. Arseniy Says:

    Thanks a lot! Good job!

  45. Jaco’s point of view. » Blog Archive » Fix Adobe Acrobat Reader’s “expr: syntax error” message Says:

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

  46. kolin Says:

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

  47. tannenbaum Says:

    COOL!!

  48. Prem Says:

    Excellent. Thanks a lot

  49. YHT Says:

    Thank you very very much!
    –YHT

  50. Giovanni Says:

    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.

  51. 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() {
    export LD_LIBRARY_PATH = $LD_LIBRARY_PATH
    return 1
    }

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

    Good luck,

    Yasuo

  52. Adobe Reader expr:syntax error endless warning « Wishes In The Night Says:

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

  53. Blognya Tedy Tirtawidjaja » Acroread Error Says:

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

  54. mahesh Says:

    Hi,
    Its great and good tip.

Leave a Reply

38 queries. 0.936s  $Revision: 1.6 $
Use Any Browser! Valid XHTML 1.0   Powered by WordPress Powered by Apache Web Server Hacker Emblem