Hướng dẫn fix lỗi "Illegal instruction: 4" 7th September 2013, 2:59 pm
Hướng dẫn fix lỗi "Illegal instruction: 4" khi chạy một số script của perl
lptrung root# $THEOS/bin/nic.pl
Illegal instruction: 4
#!/bin/bash
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/bin/perl
ldid -s /usr/bin/perl
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/bin/rsync
ldid -s /usr/bin/rsync
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/local/bin/perl
ldid -s /usr/local/bin/perl
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/lib/perl
ldid -s /usr/lib/perl
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/bin/arm-apple-darwin9-g++
ldid -s /usr/bin/arm-apple-darwin9-g++
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /private/var/stash/gcc.S9bx5X/arm-apple-darwin9/4.2.1/cc1objplus
ldid -s /private/var/stash/gcc.S9bx5X/arm-apple-darwin9/4.2.1/cc1objplus
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /private/var/stash/gcc.S9bx5X/arm-apple-darwin9/4.2.1/collect2
ldid -s /private/var/stash/gcc.S9bx5X/arm-apple-darwin9/4.2.1/collect2
Thay đổi thư mục gcc.S9bx5X cho đúng với đường dẫn của từng máy khác nhau
lptrung root# $THEOS/bin/nic.pl
Illegal instruction: 4
#!/bin/bash
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/bin/perl
ldid -s /usr/bin/perl
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/bin/rsync
ldid -s /usr/bin/rsync
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/local/bin/perl
ldid -s /usr/local/bin/perl
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/lib/perl
ldid -s /usr/lib/perl
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /usr/bin/arm-apple-darwin9-g++
ldid -s /usr/bin/arm-apple-darwin9-g++
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /private/var/stash/gcc.S9bx5X/arm-apple-darwin9/4.2.1/cc1objplus
ldid -s /private/var/stash/gcc.S9bx5X/arm-apple-darwin9/4.2.1/cc1objplus
sed -i'' 's/\x00\x30\x93\xe4/\x00\x30\x93\xe5/g;s/\x00\x30\xd3\xe4/\x00\x30\xd3\xe5/g;' /private/var/stash/gcc.S9bx5X/arm-apple-darwin9/4.2.1/collect2
ldid -s /private/var/stash/gcc.S9bx5X/arm-apple-darwin9/4.2.1/collect2
Thay đổi thư mục gcc.S9bx5X cho đúng với đường dẫn của từng máy khác nhau