DevOps/Docker

E: Release file for http:// is not valid yet (invalid for another ). Updates for this repository will not be applied

Rohin 2021. 12. 6. 12:15
반응형

Docker로 ubuntu 컨테이너를 생성하고 ubuntu컨테이너에 접근하여

#apt-get update 명령어를 했을때

더보기

# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Reading package lists... Done
E: Release file for http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease is not valid yet (invalid for another 2d 13h 17min 36s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 2d 13h 18min 9s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease is not valid yet (invalid for another 2d 13h 18min 55s). Updates for this repository will not be applied.

위와같은 에러가 발생된다.

해당 내용은 시간 동기화가 안되어서 그런부분이다.

컨테이너를 나와 도커를 설치한 서버에서 시간동기화를 해준다.

시간동기화를 한뒤에 다시 컨테이너에 접근해서 #apt-get update 명령어를 치면 정상적으로 작동한다.