網站首頁 編程語言 正文
樹莓派以及linux ubuntu 上,各種依賴不滿足,修復不了:E: Release file for xxx InRelease is not valid yet (invalid for xxx
作者:別出BUG求求了 更新時間: 2023-11-14 編程語言sudo apt update
報錯:
Reading package lists… Done E: Release file for
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/focal-updates/InRelease
is not valid yet (invalid for another 9d 23h 6min 27s). Updates for
this repository will not be applied. E: Release file for
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/focal-backports/InRelease
is not valid yet (invalid for another 9d 23h 6min 47s). Updates for
this repository will not be applied. E: Release file for
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/focal-security/InRelease
is not valid yet (invalid for another 9d 23h 6min 16s). Updates for
this repository will not be applied.
sudo apt install -f
報錯
Preparing to unpack …/libgl-dev_1.3.1-1_amd64.deb …
Unpacking libgl-dev:amd64 (1.3.1-1) …
dpkg: error processing archive /var/cache/apt/archives/libgl-dev_1.3.1-1_amd64.deb (–unpack):
trying to overwrite ‘/usr/include/GL/gl.h’, which is also in package mesa-common-dev:amd64 20.0.8-0ubuntu1~18.04.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack …/libglx-dev_1.3.1-1_amd64.deb …
Unpacking libglx-dev:amd64 (1.3.1-1) …
dpkg: error processing archive /var/cache/apt/archives/libglx-dev_1.3.1-1_amd64.deb (–unpack):
trying to overwrite ‘/usr/include/GL/glx.h’, which is also in package mesa-common-dev:amd64 20.0.8-0ubuntu1~18.04.1
Errors were encountered while processing:
/var/cache/apt/archives/libgl-dev_1.3.1-1_amd64.deb
/var/cache/apt/archives/libglx-dev_1.3.1-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo dpkg --configure -a
報錯
$ sudo dpkg --configure -a
[sudo] password for wjc:
dpkg: dependency problems prevent configuration of libglvnd-dev:amd64:
libglvnd-dev:amd64 depends on libgl-dev (>= 1.3.0-1); however:
Package libgl-dev:amd64 is not installed.
libglvnd-dev:amd64 depends on libglx-dev (>= 1.3.0-1); however:
Package libglx-dev:amd64 is not installed.dpkg: error processing package libglvnd-dev:amd64 (–configure):
dependency problems - leaving unconfigured dpkg: dependency problems
prevent configuration of libglvnd-core-dev:amd64:
libglvnd-core-dev:amd64 depends on libglvnd-dev; however: Package
libglvnd-dev:amd64 is not configured yet.dpkg: error processing package libglvnd-core-dev:amd64 (–configure):
dependency problems - leaving unconfigured Errors were encountered
while processing: libglvnd-dev:amd64 libglvnd-core-dev:amd64
解決:
可能是系統時間出問題了
手動修改服務器時間:
啟用網絡時間協議:
為了保證時間的準確性,推薦使用NTP網絡時間協議來同步時間。對的,跟windows中的 Internet 時間同步是一樣一樣的。
NTP(Network Time Protocol,網絡時間協議)是用來使網絡中的各個計算機時間同步的一種協議。NTP可以使計算機時鐘與 Internet 時間服務器同步。 這意味著可以更新計算機上的時鐘,以與時間服務器上的時鐘匹配,這有助于確保計算機上的時鐘是準確的。它的用途是把計算機的時鐘同步到世界協調時間UTC,其精度在局域網內可達0.1ms,在互聯網上絕大多數的地方其精度可以達到1-50ms。
運行以下命令,啟用NTP:
sudo timedatectl set-ntp true
啟用NTP以后,時間就是正常的嗎?我們來通過date命令來查看當前時間:
date
若沒對上現在時間,說明時區不正常
使用以下命令修改本地時區:
sudo dpkg-reconfigure tzdata
在“Configuring tzdata”中,依次選擇Asia、Chongqing,回車確認,出現了以下提示信息:
cp: cannot create regular file '/etc/localtime.dpkg-new': Read-only file system
Current default time zone: 'Asia/Chongqing'
Local time is now: Mon Apr 6 08:49:52 UTC 2015.
Universal Time is now: Mon Apr 6 08:49:52 UTC 2015.
debconf: DbDriver "config": could not write /var/cache/debconf/config.dat-new: Read-only file system
簡單來說,就是文件系統是只讀的,不能創建etc/localtime.dpkg-new文件和不能寫config.dat-new文件。
當前默認的時區是已經改成了我們想要的’Asia/Chongqing’,但是本地時間和世界時間還是一樣的,這里還有問題,應該就是只讀文件系統造成時區沒有完全配置。
使得文件系統可寫
通過askubuntu找到了Read-only file system問題的解決辦法,運行以下命令使得文件系統可寫。
重復第二步修改時區
這一次重新配置時區就比較順利了。本地時間變成了CST時間,也就是China Standard Time UTC+8:00 中國沿海時間(北京時間)。
Current default time zone: 'Asia/Chongqing'
Local time is now: Mon Apr 6 55 55 173)">173)">16:55:50 CST 2015.
Universal Time is now: Mon Apr 6 08:55:50 UTC 2015.
ubuntu@localhost:/etc$ date
Mon Apr 6 55 173)">17:55 173)">19:56 CST 2015
ubuntu@localhost:/etc$ timedatectl status
Local time: Mon 2015-04-06 55 173)">17:55 173)">36:55 173)">36 CST
Universal time: Mon 2015-04-06 09:55 173)">36:55 173)">36 UTC
RTC time: n/a
Time zone: Asia/Chongqing (CST, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
原文鏈接:https://blog.csdn.net/weixin_39589455/article/details/129540483
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2022-09-17 C/C++?中實現讓控制臺暫停的方法_C 語言
- 2023-04-07 深度解讀Python如何實現dbscan算法_python
- 2023-05-23 Python中對數據庫的操作詳解_python
- 2023-11-16 nvidia jetson設備(Jetson Nano, TX1/TX2,Xavier NX/AGX
- 2022-02-20 Android?WebView開發之WebView與Native交互_Android
- 2022-11-09 django中的auth模塊與admin后臺管理方法_python
- 2022-11-23 iOS開發學習?ViewController使用示例詳解_IOS
- 2023-10-11 在枚舉類中“優雅地”使用枚舉處理器
- 欄目分類
-
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支