独学而无友,则孤陋而寡闻!
分类: BSD
2016-08-02 11:08:13
现象: 在安装软件时,出现错误提示,并且拒绝安装:原因: 缓存中的数据跟实际数据不一样,清空一下缓存数据即可,或者更新一下pkg的数据:
- Fetching npm-3.9.2.txz: 100% 2 MiB 1.1MB/s 00:02
- pkg: cached package npm-3.9.2: size mismatch, fetching from remote
- Fetching npm-3.9.2.txz: 100% 2 MiB 1.1MB/s 00:02
- pkg: cached package npm-3.9.2: size mismatch, cannot continue
其他解决方案:
- pkg update -f
---- end ----
- pkg clean # cleans /var/cache/pkg/
- rm -rf /var/cache/pkg/* # just remove it all
- pkg update -f # forces update of repository catalog
- rm /var/db/pkg/repo-*.sqlite # removes all remote repository catalogs
- pkg bootstrap -f # forces reinstall of pkg