The parton and hadron cascade model PACIAE 2.1 (cf. Comput. Phys. Commun.184 (2013) 1476) has been upgraded to the new issue of PACIAE 2.2. By this new issue the lepton-nucleon and lepton-nucleus (inclusive) deep inelastic scatterings can also be investigated. As an example, the PACIAE 2.2 model is enabled to calculate the specific charged hadron multiplicity in the $e^-$+p and $e^-$+D semi-inclusive deep-inelastic scattering at 27.6 GeV electron beam energy. The calculated results are well comparing with the corresponding HERMES data. Additionally, the effect of model parameters alpha and beta in the Lund string fragmentation function on the multiplicity is studied.