What Should I Do If the swig Dependency Package Cannot Be Installed?
Symptom
If the swig dependency package fails to be installed during TF Serving build, the error message shown below is displayed:
E: The package ascend-cann-toolkit needs to be reinstalled, but I can't find an archive for it.
Solution
Perform the following steps to reinstall the swig dependency package:
- Back up /var/lib/dpkg/status.
cp /var/lib/dpkg/status /{newfilepath}/statusIn the command, {newfilepath} indicates the path to be backed up. Replace it with the actual path.
- Open the /var/lib/dpkg/status file, locate the record of the software package that fails to install, and remove the record, as shown in the marked position in Figure 1.
- Reinstall swig.
apt install swig
