因此,我安装了 squid,在删除 squid 时,我意外删除了 /etc/squid/ 文件夹。现在我无法再次安装 squid。我现在该如何安装 squid。输出apt-get install squid
Selecting previously unselected package libecap3:amd64.
(Reading database ... 235907 files and directories currently installed.)
Preparing to unpack .../libecap3_1.0.1-3ubuntu3_amd64.deb ...
Unpacking libecap3:amd64 (1.0.1-3ubuntu3) ...
Selecting previously unselected package squid.
Preparing to unpack .../squid_3.5.12-1ubuntu7.3_amd64.deb ...
Unpacking squid (3.5.12-1ubuntu7.3) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link
/sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu17) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Setting up libecap3:amd64 (1.0.1-3ubuntu3) ...
Setting up squid (3.5.12-1ubuntu7.3) ...
Skipping profile in /etc/apparmor.d/disable: usr.sbin.squid
Processing triggers for libc-bin (2.23-0ubuntu7) ...
/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link
/sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link
然后如果我跑squid
FATAL: Unable to open configuration file: /etc/squid/squid.conf: (2) No such file or directory
Squid Cache (Version 3.5.12): Terminated abnormally.
CPU Usage: 0.012 seconds = 0.004 user + 0.008 sys
Maximum Resident Size: 45136 KB
Page faults with physical i/o: 0
答案1
尝试使用 confs 删除 squid:
sudo apt purge squid
然后再次安装:
sudo apt install squid
答案2
对我来说不起作用。我得到的只是
sudo apt-get install squid 正在读取软件包列表... 完成 正在构建依赖关系树
正在读取状态信息... 完成 squid 已经是最新版本 (3.5.12-1ubuntu7.8)。 0 个已升级、0 个新安装、0 个要删除且 43 个未升级。1 个未完全安装或删除。 执行此操作后,将使用 0 B 的额外磁盘空间。 是否继续?[Y/n] 正在设置 squid (3.5.12-1ubuntu7.8) ... update-rc.d: 错误:initscript 不存在:/etc/init.d/squid dpkg:处理软件包 squid (--configure) 时出错: 子进程已安装 安装后脚本返回错误 退出状态 1 处理时遇到错误:squid E:子进程 /usr/bin/dpkg 返回错误代码 (1)
我尝试重新安装、删除、清除,但都返回错误。
Linuxmint(基于 Ubuntu 16-04)无法重复无法删除基本 squid 包