1

I'm trying to install squid but apt can't finish installation, and returns these errors:

After this operation, 7,263 kB of additional disk space will be used.
Selecting previously unselected package squid.
(Reading database ... 156110 files and directories currently installed.)
Preparing to unpack .../squid_3.5.23-5+deb9u1_amd64.deb ...
Unpacking squid (3.5.23-5+deb9u1) ...
Setting up squid (3.5.23-5+deb9u1) ...
Setcap worked! /usr/lib/squid/pinger is not suid!
Job for squid.service failed because a timeout was exceeded.
See "systemctl status squid.service" and "journalctl -xe" for details.
invoke-rc.d: initscript squid, action "restart" failed.
● squid.service - LSB: Squid HTTP Proxy version 3.x
   Loaded: loaded (/etc/init.d/squid; generated; vendor preset: enabled)
   Active: failed (Result: timeout) since Wed 2020-04-22 11:54:36 CDT; 7ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1888 ExecStart=/etc/init.d/squid start (code=exited, status=0/SUCCESS)
    Tasks: 24 (limit: 4915)
   CGroup: /system.slice/squid.service
           ├─  338 /usr/sbin/squid -YC -f /etc/squid/squid.conf
           ├─  340 (squid-1) -YC -f /etc/squid/squid.conf
           ├─  341 (logfile-daemon) /var/log/squid/access.log
           ├─  342 (pinger)
           ├─  950 /usr/sbin/squid -YC -f /etc/squid/squid.conf
           ├─  952 (squid-1) -YC -f /etc/squid/squid.conf
           ├─  953 (logfile-daemon) /var/log/squid/access.log
           ├─  954 (pinger)
           ├─ 1926 /usr/sbin/squid -YC -f /etc/squid/squid.conf
           ├─ 1928 (squid-1) -YC -f /etc/squid/squid.conf
           ├─ 1929 (logfile-daemon) /var/log/squid/access.log
           ├─ 1930 (pinger)
           ├─31261 /usr/sbin/squid -YC -f /etc/squid/squid.conf
           ├─31263 (squid-1) -YC -f /etc/squid/squid.conf
           ├─31264 (logfile-daemon) /var/log/squid/access.log
           ├─31265 (pinger)
           ├─31597 /usr/sbin/squid -YC -f /etc/squid/squid.conf
           ├─31599 (squid-1) -YC -f /etc/squid/squid.conf
           ├─31600 (logfile-daemon) /var/log/squid/access.log
           ├─31601 (pinger)
           ├─31949 /usr/sbin/squid -YC -f /etc/squid/squid.conf
           ├─31951 (squid-1) -YC -f /etc/squid/squid.conf
           ├─31952 (logfile-daemon) /var/log/squid/access.log
           └─31953 (pinger)

Apr 22 11:49:36 backgroundserver systemd[1]: Starting LSB: Squid HTTP Proxy version 3.x...
Apr 22 11:49:36 backgroundserver squid[1926]: Squid Parent: will start 1 kids
Apr 22 11:49:36 backgroundserver squid[1888]: Starting Squid HTTP Proxy: squid.
Apr 22 11:49:36 backgroundserver systemd[1]: squid.service: PID file /var/run/squid.pid not readable (yet?) after start: No such file or directory
Apr 22 11:49:36 backgroundserver squid[1926]: Squid Parent: (squid-1) process 1928 started
Apr 22 11:54:36 backgroundserver systemd[1]: squid.service: Start operation timed out. Terminating.
Apr 22 11:54:36 backgroundserver systemd[1]: Failed to start LSB: Squid HTTP Proxy version 3.x.
Apr 22 11:54:36 backgroundserver systemd[1]: squid.service: Unit entered failed state.
Apr 22 11:54:36 backgroundserver systemd[1]: squid.service: Failed with result 'timeout'.
dpkg: error processing package squid (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (232-25+deb9u12) ...
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 squid
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't find what to do.

3
  • It says there in the status that /var/run/squid.pid doesn't exist which is causing it to fail. You can also look at what's happening in the log files at /var/log/squid/cache.log and /var/log/syslog. Apr 22, 2020 at 19:12
  • Start with most simple squid.conf possible and go from there. We have no problems whatsoever with squid on Debian 10. See docs.diladele.com/administrator_guide_stable/install/debian10/….
    – Rafael
    Apr 23, 2020 at 10:44
  • This is not a conf issue, it's a fresh squid install the the conf is from the install.
    – Entretoize
    Apr 24, 2020 at 6:15

1 Answer 1

0

Open terminal and run:

Purge (previous versions):

sudo apt -y purge squid* &> /dev/null
sudo rm -rf /var/spool/squid/* /var/log/squid/* /etc/squid3 /dev/shm/* &> /dev/null

Install:

sudo apt -y install squid squid-langpack
if [ ! -d /var/log/squid ]; then sudo mkdir -p /var/log/squid && sudo touch /var/log/squid/{access,cache}.log && sudo chown -R proxy:proxy /var/log/squid; fi

Crontab (optional):

sudo crontab -l | { cat; echo "@weekly squid -k rotate"; } | sudo crontab -

PD: Tested on Ubuntu 20.04 (not debian)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .