Error on install postgres client

When I ran my ruby test, give me an error when install postgres.

Follow the log:

#!/bin/bash -eo pipefail
sudo apt install postgresql-client
Reading package lists… 1%
Reading package lists… Done

Building dependency tree… 50%
Building dependency tree

Reading state information… Done

The following extra packages will be installed:
lsb-release postgresql-client-9.4 postgresql-client-common
Suggested packages:
lsb postgresql-9.4 postgresql-doc-9.4
The following NEW packages will be installed:
lsb-release postgresql-client postgresql-client-9.4 postgresql-client-common
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1239 kB of archives.
After this operation, 4854 kB of additional disk space will be used.
Err http[://]security[dot]debian[dot]org/ jessie/updates/main postgresql-client-9.4 amd64 9.4.13-0+deb8u1
404 Not Found [IP: 80]
0% [Waiting for headers]Get:1 http[://]deb[dot]debian[dot]org/debian/ jessie/main lsb-release all 4.1+Debian13+nmu1 [26.5 kB]
Get:2 http[://]deb[dot]debian[dot]org/debian/ jessie/main postgresql-client-common all 165+deb8u2 [73.7 kB]
Get:3 http[://]deb[dot]debian[dot]org/debian/ jessie/main postgresql-client all 9.4+165+deb8u2 [52.2 kB]
Fetched 152 kB in 0s (2394 kB/s)
E: Failed to fetch http[://]security[dot]debian[dot]org/pool/updates/main/p/postgresql-9.4/postgresql-client-9.4_9.4.13-0+deb8u1_amd64.deb 404 Not Found [IP: 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Exited with code 100

As the error message states try running update first.

sudo apt update && sudo apt install postgresql-client

Thanks. It worked!