Debian系统apt-get build-dep命令
apt-get build-dep 包名,这条命令用于在编译安装软件时,自动安装相关的编译环境。比如我要编译nginx,当然可以从网上找到需安装哪些库,用apt-get install XXXX XXXX XXXX ... 来进行安装。但是有时候装了一堆库,可能有几个是用不到的。而是用apt-get build-dep命令可以更好的管理这些库文件和编译环境。
先更新软件源列表:
apt-get update
以编译nginx为例,安装所需的编译环境:
apt-get build-dep nginx
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: autopoint autotools-dev binutils build-essential bzip2 cpp cpp-4.4 debhelper dpkg-dev fakeroot g++ g++-4.4 gcc gcc-4.4 gettext git html2text intltool-debian libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev libcroco3 libcurl3-gnutls libdpkg-perl liberror-perl libgeoip-dev libglib2.0-0 libglib2.0-data libgmp3c2 libgomp1 libmail-sendmail-perl libmpfr4 libpcre3-dev libpcrecpp0 libssl-dev libstdc++6-4.4-dev libsys-hostname-long-perl libtimedate-perl libunistring0 linux-libc-dev make manpages-dev po-debconf rsync shared-mime-info zlib1g-dev The following packages will be upgraded: libc-bin libc6 libc6-i686 libc6-xen libssl0.9.8 5 upgraded, 48 newly installed, 0 to remove and 54 not upgraded. Need to get 52.7 MB of archives. After this operation, 122 MB of additional disk space will be used. Do you want to continue [Y/n]? Y ...
由于关系包有很多,如果想卸载可以在安装前先记录下build-dep安装的包:
apt-get build-dep nginx | tee nginx-build-dep.txt
Debian系统可以用Deborphan清理没有被依赖的软件包:
apt-get install deborphan
查找没有被依赖的软件包:
deborphan -sPz
删除找到的包:
apt-get autoremove `deborphan`
参考资料:
http://wiki.linux.org.hk/w/Deborphan
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
2015-03-03 查看Windows端口及端口关闭方法