move withDeps before install ext deps, Fix #981