Fix Adobe Acrobat Reader’s “expr: syntax error” message
20070601 17:39 by javierAfter 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 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.
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.





















June 7th, 2007 at 20:07
[...] Fix Adobe Acrobat Reader’s “expr: syntax error” message [...]
June 9th, 2007 at 9:14
Thanks — your fix saved me from a lot of useless reinstallations :)
June 11th, 2007 at 2:00
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
June 14th, 2007 at 16:49
A fine job Javier!
Thanks,
Tom
June 16th, 2007 at 20:38
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.
June 19th, 2007 at 4:07
Why aren’t they republishing a working version ?!
June 25th, 2007 at 22:22
YOU ROCK!!!!!!
What is the matter with Adobe for letting a bug like that out the door?????
June 26th, 2007 at 7:45
Thanks! adobe products on linux sucks, other succesful case.
July 2nd, 2007 at 0:21
You rock!! We switched to kpdf already! But his is good.
YOu rock!!
July 2nd, 2007 at 2:14
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
July 2nd, 2007 at 4:01
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 ;-)
July 3rd, 2007 at 5:49
Thanks for this fix. It was very helpful
July 5th, 2007 at 8:40
Jolie boulot!!! (in french dans le texte;)
July 6th, 2007 at 6:16
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.
July 8th, 2007 at 9:17
WOW!! I was tearing my hair out. Many, many thanks Javier. Will look at kpdf
Thanks again
July 9th, 2007 at 13:09
Thanks for that. Ace tip, worked straight away.
Why can’t Adobe just fix it themselves.
July 13th, 2007 at 19:15
Thanks from Brazil dude
July 16th, 2007 at 18:11
Thanks from Germany.
The asterisk solved my problem.
Great Work.
July 17th, 2007 at 3:06
Thanks for the acroread fix.
July 23rd, 2007 at 5:08
And another satisfied customer :)
Thanks!!
July 27th, 2007 at 20:20
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.
July 28th, 2007 at 4:22
[...] 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 [...]
July 29th, 2007 at 12:33
Thanks, saved my day. I have googled with the following phrase and this page was the first one.
acrobat reader linux “expr: syntax error”
July 30th, 2007 at 16:12
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
July 30th, 2007 at 16:18
Thanks, Great tip. No mention of this on Adobe’s site anywhere.
July 31st, 2007 at 5:38
Great! very useful tip.
Shine
August 2nd, 2007 at 1:47
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.
August 3rd, 2007 at 7:25
You’re a great!
August 6th, 2007 at 11:32
Thank you very much!
Well done!
I’ve had problems with gentoo 2007.0 and Acrobat 7 and the asterisk was the key.
August 7th, 2007 at 22:27
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
August 8th, 2007 at 3:47
Thanks once more!
August 8th, 2007 at 9:53
Nice that your site came up first because it solved my problem immediately. Thanx alot.
August 8th, 2007 at 11:47
Excellent quick Fix!
Now Acrobat work well on my slackware 12!
Thanks!
August 9th, 2007 at 13:24
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
August 10th, 2007 at 1:23
Thanks
i got worked
…Fine on Acroread
Thanks lot
August 13th, 2007 at 18:42
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 ?)
August 14th, 2007 at 0:29
Javier,
Well done.
Thank you a lot dude.
August 17th, 2007 at 11:33
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
August 18th, 2007 at 20:41
Good Job.
Thanks Alot
August 19th, 2007 at 19:55
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.
August 22nd, 2007 at 5:16
Hi, thank you for this fix. Hm, Adobe must be aware of this problem and they are still distribute such buggy version… ;(
August 22nd, 2007 at 9:07
Hi!
Great work, it was very useful, you saved me lot of time.
Thanks a lot!
August 24th, 2007 at 9:42
[...] 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 [...]
August 24th, 2007 at 11:15
Thanks a lot! Good job!
August 28th, 2007 at 2:16
[...] 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 [...]
August 28th, 2007 at 7:04
Thanks !!!!!
Saved my neck and hours of reinstallation
==k
August 30th, 2007 at 4:27
COOL!!
September 4th, 2007 at 4:06
Excellent. Thanks a lot
September 5th, 2007 at 22:43
Thank you very very much!
–YHT
September 7th, 2007 at 12:09
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.
September 11th, 2007 at 11:04
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
October 24th, 2007 at 1:26
[...] one I liked more, was at Javier Arturo Rodríguez weblog and is mirrored in here for security (and easy access and remembering) [...]
January 6th, 2008 at 1:27
[...] 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 [...]
January 22nd, 2008 at 4:44
Hi,
Its great and good tip.