Acrobat Reader 7 and FC6
I broke down and wanted to install Adobe Acrobat Reader 7 on my FC6 box to replace xpdf. After installing it from the tar.gz version the acroread startup script bombed out with the error: expr substr 2400000000000 1
After a little searching I didn’t find much help so I started looking at the script myself to see if I could track down the problem. It turns out that it wasn’t that hard to fix. First off the script file was located at: /usr/bin/acroread
Open the script file and find the function named “check_gtk_ver_and_set_lib_path”. This is the location of the first error you will hit. To fix the error you will need to change:
base_version=`expr substr "${base_version}0000000000" 1 $len_version`
to
blah1="${base_version}0000000000"
base_version=${blah1:1:$len_version}
You will find this two places and it needs to be changed in both. If you don’t notice the 2nd place it is right after the first in a loop:
while [ $len_version -gt $len_base_version ]; do
The second problem you will have is located in the function “get_gtk_file_ver”. Find this function and change the following line:
echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'
to
echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)000.\([0-9]*\)\|\(.*\)/\1\2\3/g'
Now you should be able to run acroread without errors.