November 1, 2011
BitDefender Antivirus Scanner for Unices
As many BitDefender Antivirus Scanner for Unices users have noticed, attempting to run the command line tool (bdscan) or the GUI application will result in an unexpected segmentation fault. The issue is caused by an incompatibility between the latest antivirus engines retrieved through update and the their platform specific component (bdcore.so) which currently cannot be updated. Until a new build of the packages is made, the solution is to grab the latest bdcore.so library and use it to replace the existing one. In order to accomplish this task you will need run the following comands as root:
# cat /opt/BitDefender-scanner/var/lib/scan/versions.dat.* | \
awk '/bdcore.so.linux/ {print $3}' | \
while read bdcore_so; do
touch /opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
bdscan --update;
mv /opt/BitDefender-scanner/var/lib/scan/bdcore.so \
/opt/BitDefender-scanner/var/lib/scan/bdcore.so.old;
ln -s /opt/BitDefender-scanner/var/lib/scan/$bdcore_so \
/opt/BitDefender-scanner/var/lib/scan/bdcore.so;
chown bitdefender:bitdefender \
/opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
done
We apologize for any inconvenience created by this issue. Thank you.

Comments(23)
It works like a charm. I just prepared to send you a bug report, but I remembered to read this blog.
For those new-but-not-very-new to Linux world: copy/paste the following code into a new text document:
————–CUT FROM BELOW———-
#!/bin/bash
cat /opt/BitDefender-scanner/var/lib/scan/versions.dat.* | \
awk ‘/bdcore.so.linux/ {print $3}’ | \
while read bdcore_so; do
touch /opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
bdscan –update;
mv /opt/BitDefender-scanner/var/lib/scan/bdcore.so \
/opt/BitDefender-scanner/var/lib/scan/bdcore.so.old;
ln -s /opt/BitDefender-scanner/var/lib/scan/$bdcore_so \
/opt/BitDefender-scanner/var/lib/scan/bdcore.so;
chown bitdefender:bitdefender \
/opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
done
—————STOP CUT ABOVE—————
Save it, name it bd.sh. Right click on the bd.sh, go to Properties, Permissions. Mark the checkbox for Executable, close the window.
Open a terminal window, navigate in the folder that contains your fresh bash script bd.sh, and introduce the following command using sudo:
sudo sh bd.sh
After your credentials, the work will be done automatically.
It is the same code from above, but containing the line that tell the system that it have to deal with a bash script.
I think someone will need this information; if the blog admin do not think so, do not allow it.
Thank you for your work.
I got an error : “awk: 1: unexpected character 0xe2″.
Both manually & w/Marian Vasile’s bd.sh script.
I’ve been using bitdefender & Linux for a long-time, but I’m still a newb when it comes to programming & Linux in general. So I really don’t know what to do! lol
Can anyone shed some light plz?
Thanks!
oh, sweet. i got it to work w/:
#!/bin/bash
cat /opt/BitDefender-scanner/var/lib/scan/versions.dat.* | \
awk ‘/bdcore.so.linux/ {print $3}’ | \
while read bdcore_so; do
touch /opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
bdscan –update;
mv /opt/BitDefender-scanner/var/lib/scan/bdcore.so \
/opt/BitDefender-scanner/var/lib/scan/bdcore.so.old;
ln -s /opt/BitDefender-scanner/var/lib/scan/$bdcore_so \
/opt/BitDefender-scanner/var/lib/scan/bdcore.so;
chown bitdefender:bitdefender \
/opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
done
guess the formatting was messing it up.
In the above example, the shell dislikes the wiki version of single quote. It complains about invalid character in the awk line.
A minor change to replace the single quotes allows the otherwise seg faulting cmd line or non visible gui to complete.
First run of the .sh though still mentioned seg fault, second run no such problem and the gui also launched cleanly.
I ran the commands but still get:
*** glibc detected *** bdscan: corrupted double-linked list: 0x00000000041ba640 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x78a96)[0x7f40cc72ea96]
/lib/x86_64-linux-gnu/libc.so.6(+0x7ad6d)[0x7f40cc730d6d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x6d)[0x7f40cc73277d]
[0x7f40cd306640]
======= Memory map: ========
00400000-0041d000 r-xp 00000000 08:01 522032 /opt/BitDefender-scanner/bin/bdscan
0051d000-0051f000 rw-p 0001d000 08:01 522032 /opt/BitDefender-scanner/bin/bdscan
01a27000-07b3d000 rw-p 00000000 00:00 0 [heap]
7f40b51b6000-7f40b5beb000 rw-p 00000000 00:00 0
Works, problem solved. Thanks for the support.
the ln command needss to be set by hand in the folder given on Mint12.
replace ‘ with ” and you should be good to go.
Great resolution!!
I just copied the command line as is from the very first message and pasted into a root terminal…worked perfectly.
Bitdefender works again…
Thank you.
Worked like a charm !
it works
Works very well. Thanks!
I run the script on my 64 box and still same error, seems what comes in the update is 32 while the installation is 64, really is just badly written.
I’m removing and purging.
I changed the ‘ to a “, however when I run the script I am given this error:
:::START ERROR:::
ln: target `/opt/BitDefender-scanner/var/lib/scan/bdcore.so’ is not a directory
:::END ERROR:::
How do I fix the script? Alternatively – where is the file download so that I may just replace it manually?
$sudo cat /opt/BitDefender-scanner/var/lib/scan/versions.dat.* | \
awk ‘/bdcore.so.linux/ {print $3}’ | \
while read bdcore_so; do
touch /opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
bdscan –update;
mv /opt/BitDefender-scanner/var/lib/scan/bdcore.so \
/opt/BitDefender-scanner/var/lib/scan/bdcore.so.old;
ln -s /opt/BitDefender-scanner/var/lib/scan/$bdcore_so \
/opt/BitDefender-scanner/var/lib/scan/bdcore.so;
chown bitdefender:bitdefender \
/opt/BitDefender-scanner/var/lib/scan/$bdcore_so;
done
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
in my linuxmint 13 64bit
but it reply:
touch: cannot touch `/opt/BitDefender-scanner/var/lib/scan/bdcore.so.linux-x86_64′: Permission denied
BitDefender Antivirus Scanner for Unices v7.90123 Linux-amd64
Copyright (C) 1996-2009 BitDefender. All rights reserved.
Trial key found. 30 days remaining.
Error: You need superuser privileges in order to perform an update
mv: cannot move `/opt/BitDefender-scanner/var/lib/scan/bdcore.so’ to `/opt/BitDefender-scanner/var/lib/scan/bdcore.so.old’: Permission denied
ln: failed to create symbolic link `/opt/BitDefender-scanner/var/lib/scan/bdcore.so’: File exists
chown: cannot access `/opt/BitDefender-scanner/var/lib/scan/bdcore.so.linux-x86_64′: No such file or directory
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
plz help me out ….
hi people,
this part here with:
Error: You need superuser privileges in order to perform an update
mv: cannot move `/opt/BitDefender-scanner/var/lib/scan/bdcore.so’ to `/opt/BitDefender-scanner/var/lib/scan/bdcore.so.old’: Permission denied
ln: failed to create symbolic link `/opt/BitDefender-scanner/var/lib/scan/bdcore.so’: File exists
chown: cannot access `/opt/BitDefender-scanner/var/lib/scan/bdcore.so.linux-x86_64′: No such file or directory
must be done in a root-Terminal.
So open up your Terminal and first put in:
su (then you are asked for your user-password and please enter it).
Then paste the text from above into the Terminal. Then the licence-agreement shows up in the Terminal and then you are asked to type in the word accept. So type in this word and then type in exit to leave the root-Terminal.
Then it works like a charm.
Greetings
Andrea
Screw this. I gave up on this. I’ve removed it; too much trouble. Am trying out Comodo antivirus, and can get it to work with as little effort as 10 minutes of insane monkey screaming! Much less cursing involved than with ButtDefender. Ha! That was funny because I …, aw, just forget it.
Good
I did like shown above. I can start the GUI now but when I want to do a scan it tells me:
Error: core loading failed
Please help!!!
youve got to be kidding me right? none of this works…
BitDefender
http://www.bitdefender.com/
Please enter “accept” if you agree to the License Agreement.
Enter anything else if you don’t agree to the terms in the License Agreement.
ln: target `/opt/BitDefender-scanner/var/lib/scan/bdcore.so’ is not a directory
so theres something called bdcore.so.old i even tried to copy bdcore.so.old and rename it to bdcore.so this is the stupidest shit I’ve had to deal with in a long time you people are retarded period uninstalling this stupid crap.
ohh… my mistake, i ran the bash script renamed a file and tada it works. im happy now and you guys rawk…… eating Crow here thanks.
OS Ubuntu 12.04 64 bit with 32 bit libraries installed, it ran fine but after update does not.
So, last attempt I uninstalled then reinstalled. I did not start BitDefender, just ran bd.sh. I get an error…to the effect that in
ln -s /opt/BitDefender-scanner/var/lib/scan/$bdcore_so \
/opt/BitDefender-scanner/var/lib/scan/bdcore.so;
Not a directory.
Yah… I am could be more conversant with linux, and I am sure others are less so than I. Anyone with an idea of what I should change? All the files and subdirs are really there. I looked. I want to use BitDefender to check the Win7 partition.
Thank you very much, I was having the worst time figuring this one out.
The fix worked perfectly first time… Well then again I am a linux guru…lol
Br to all,
jz
I am using Ubuntu 12.04 and installed BitDefender-Antivirus-Scanner-7.6-4.linux-gcc4x.amd64.deb.run . It worked, but after updating I got the segmentation problem and the script above didn’t work.
My solution was: the installing of the package – original-awk ( Ubuntu( Debian) package) and the script worked!