rewrite install package method

Signed-off-by: coldnew <coldnew.tw@gmail.com>