<commit_before>#!/bin/bash
# Author:  yeho <lj2007331 AT gmail.com>
# Blog:  http://blog.linuxeye.com

Install_ImageMagick()
{
cd $lnmp_dir/src
. ../functions/download.sh
. ../options.conf

src_url=http://downloads.sourceforge.net/project/imagemagick/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz && Download_src

tar xzf ImageMagick-6.8.9-10.tar.gz
cd ImageMagick-6.8.9-10
./configure --prefix=/usr/local/imagemagick
make && make install
cd ../
/bin/rm -rf ImageMagick-6.8.9-10

if [ -e "$php_install_dir/bin/phpize" ];then
	src_url=http://pecl.php.net/get/imagick-3.1.2.tgz && Download_src
	tar xzf imagick-3.1.2.tgz
	cd imagick-3.1.2
	make clean
	export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
	$php_install_dir/bin/phpize
	./configure --with-php-config=$php_install_dir/bin/php-config --with-imagick=/usr/local/imagemagick
	make && make install
	cd ../
	/bin/rm -rf imagick-3.1.2

	if [ -f "$php_install_dir/lib/php/extensions/`ls $php_install_dir/lib/php/extensions | grep zts`/imagick.so" ];then
		[ -z "`cat $php_install_dir/etc/php.ini | grep '^extension_dir'`" ] && sed -i "s@extension_dir = \"ext\"@extension_dir = \"ext\"\nextension_dir = \"$php_install_dir/lib/php/extensions/`ls $php_install_dir/lib/php/extensions | grep zts`\"@" $php_install_dir/etc/php.ini
		sed -i 's@^extension_dir\(.*\)@extension_dir\1\nextension = "imagick.so"@' $php_install_dir/etc/php.ini
	        [ "$Apache_version" != '1' -a "$Apache_version" != '2' ] && service php-fpm restart || service httpd restart
	else
	        echo -e "\033[31mPHP imagick module install failed, Please contact the author! \033[0m"
	fi
fi
cd ../
}<commit_msg>[Solved] Illegal instruction installing ImageMagick on Ubuntu and Debian<commit_after>#!/bin/bash
# Author:  yeho <lj2007<EMAIL>>
# Blog:  http://blog.linuxeye.com

Install_ImageMagick()
{
cd $lnmp_dir/src
. ../functions/download.sh
. ../options.conf

src_url=http://downloads.sourceforge.net/project/imagemagick/old-sources/6.x/6.8/ImageMagick-6.8.8-10.tar.gz && Download_src

tar xzf ImageMagick-6.8.8-10.tar.gz
cd ImageMagick-6.8.8-10
./configure --prefix=/usr/local/imagemagick
make && make install
cd ../
/bin/rm -rf ImageMagick-6.8.8-10

if [ -e "$php_install_dir/bin/phpize" ];then
	src_url=http://pecl.php.net/get/imagick-3.1.2.tgz && Download_src
	tar xzf imagick-3.1.2.tgz
	cd imagick-3.1.2
	make clean
	export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
	$php_install_dir/bin/phpize
	./configure --with-php-config=$php_install_dir/bin/php-config --with-imagick=/usr/local/imagemagick
	make && make install
	cd ../
	/bin/rm -rf imagick-3.1.2

	if [ -f "$php_install_dir/lib/php/extensions/`ls $php_install_dir/lib/php/extensions | grep zts`/imagick.so" ];then
		[ -z "`cat $php_install_dir/etc/php.ini | grep '^extension_dir'`" ] && sed -i "s@extension_dir = \"ext\"@extension_dir = \"ext\"\nextension_dir = \"$php_install_dir/lib/php/extensions/`ls $php_install_dir/lib/php/extensions | grep zts`\"@" $php_install_dir/etc/php.ini
		sed -i 's@^extension_dir\(.*\)@extension_dir\1\nextension = "imagick.so"@' $php_install_dir/etc/php.ini
	        [ "$Apache_version" != '1' -a "$Apache_version" != '2' ] && service php-fpm restart || service httpd restart
	else
	        echo -e "\033[31mPHP imagick module install failed, Please contact the author! \033[0m"
	fi
fi
cd ../
}
{'fraction_non_alphanumeric': 0.17492447129909366, 'fraction_numerical': 0.03172205438066465, 'mean_word_length': 3.7435530085959887, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3360978', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1316, 'n_words': 224}