5
even though still the same problem occurring while installing or uninstalling, but, actually it works!
I did two things:
1. add two lines into class/bootstrap.php
include_once "../../mainfile.php";
if(!defined('SMARTY_DIR')) define ('SMARTY_DIR', XOOPS_ROOT_PATH.'/class/smarty/');
2. add a line into class/template/templateutils.class.php
line20: require_once XOOPS_ROOT_PATH.'/class/smarty/Smarty.class.php';
I am not sure which one take effect actually.