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.

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() {
    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

  2. mahesh says:

    Hi,
    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:

    Hi

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

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

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

    Before:

    echo $mfile| sed ‘s/libgtk-x11-\([0-9]*\).0.so.0.\([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 […]

About me

I am a Software Architect, System Administrator, Entrepreneur and Open Data advocate, with 21 years of 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.

Debian Consulting

Whether you need to manage a single server, orchesthrate a PaaS cluster or need support for a whole fleet of IoT devices running Debian GNU/Linux, I can help you get the best performance from your hardware. Please contact me for additional information and to get a quote.

Certifications

Sun Certified Enterprise Architect
Sun Solaris Certified Security Administrator
Sun Solaris Certified Network Administrator
Sun Solaris Certified System Administrator
Linux Foundation Certified Sysadmin
Linux Foundation Certified Engineer

Microblogging