もうちょっとだけ続くんじゃぞ
結局、gmpのコンパイルオプションが間違っていたわけだったので、再度、gmpをダウンロードしてきて、
tar zxvf gmp-4.2.1.tar.gz cd gmp-4.2.1 ./configure --enable-cxx make make check |tee makecheck.log less makecheck.log sudo make install cd ..
以下の内容のうち、--disable-dsigを削除して、updateclam.shという名前で保存して、実行。
vi updateclam.sh chmod +x updateclam.sh ./updateclam.sh
それでこれが、updateclam.sh
#!/bin/sh ############################################## Documentation: ## This script downloads the latest version of clamav and installs ## it compatibly with ClamXav based on work here ## http://www.macosxhints.com/article.php?story=20060409060940665&query=clam ## My example uses a download from the east coast - see ## http://prdownloads.sourceforge.net/clamav/ clamav-0.88.2.tar.gz?download ## for an example of the possible downloads as of version 0.88.2 ## note the download urls are not displayed but check the path of the actual download ## most of my comments follow the line of code ## I document for learning as well as documenting purposes ## the next thing this should do I think is hide all the text flying by, ## report success or not## and be included as a program or plugin to clamXav ## note this only updates the engine. An installation of ClamXav will do other things ## and should be done BEFORE doing this update. # * Modified by fu7mu4 # ** changing download site to Japanese mirror Jaist # ** adding sudo command to chown,chgrp,chmod # ** remove "cd" from rm -Rf cd clam-$latest 2006/05/09 ############################################ #url="http://superb-east.dl.sourceforge.net/sourceforge/clamav/clamav-" url="http://jaist.dl.sourceforge.net/sourceforge/clamav/clamav-" # this is a variable which has most of the download url, it's missing the # version number # the following line downloads a url as a file in the default location # and it will have the latest version in the html of the file downloaded latest=`curl -O "http://www.clamav.net/stable.php#pagestart" \ ; grep "released (" stable.php* | awk '{print $2}' | head -1` # this line searches the file named stable.php{anything} for "released (" # and backs up to the version number in this line of text curl -O $url$latest.tar.gz && \ # this downloads the resulting file name as a file of the same name printf "The latest version of clamav or %s has been downloaded!\n" $latest && \ tar zxvf clamav-$latest.tar.gz && \ cd clamav-$latest./configure --prefix=/usr/local/clamXav && # this tells the compiler to install the comilation in the clamXav compatible location make && \ sudo make install && \ # the following lines reset permissions as needed by clamXav as documented at # http://markallan.co.uk/clamXav/index.php?page=byo sudo chown -R root /usr/local/clamXav sudo chgrp -R admin /usr/local/clamXav sudo chmod -R 666 /usr/local/clamXav/etc/freshclam.conf sudo chmod u+s /usr/local/clamXav/bin/freshclam sudo chmod a+wr /usr/local/clamXav/share/clamav/freshclam.log sudo chown -R clamav /usr/local/clamXav/share/clamav sudo chgrp -R clamav /usr/local/clamXav/share/clamav sudo chmod -R g+w /usr/local/clamXav/share/clamav sudo chmod -R u+w /usr/local/clamXav/share/clamav printf "Ok I am updating to the latest virus definitions for \version %s by running freshclam.", $latest && \ /usr/local/clamXav/bin/freshclam && \ # these steps clean up all the stuff downloaded and or created cd .. rm -Rf clamav-$latest rm -f clamav-$latest.tar.gz rm -f stable.php*
clamXavのサポート掲示板(英語)にfumin名義でポストしておきました。
*1:less はmake checkの確認