apt-mirror is already running(已运行)错误解决方案

本文介绍了当遇到apt-mirror服务无法启动,并显示已运行错误时的解决办法。主要是由于非正常终止apt-mirror进程导致锁定文件未被删除,文中提供了手动删除锁定文件的具体步骤,以确保服务能够正常启动。

运行sudo apt-mirror却无法启动服务了。而是给出了一行错误提示信息:
               apt-mirror is already running, exiting at /usr/bin/apt-mirrir lin 187

造成这种故障的原因是非正常终止了apt-mirror,或者apt-mirror没 有同步完数据,而客户按下了Ctrl+C强行中断了数据同步,而造成apt-mirror为删除进程锁定文件apt-mirror。故而,运行apt- mirror时会提示说:apt-mirror is already running(apt-mirror正在运行)错误。
既然知道了故障原因,那么,解决方案也就呼之欲出了。既然上次终止apt-mirror时没有正常删除进程锁定文件,那我们手动删除apt-mirror.lock这一文件就能够解决故障了。

sudo  rm /var/spool/apt-mirror/var/apt-mirror.lock   #这里的路径是你设置的本地源的地址

现在,再次运行sudo apt-mirror,一切就都恢复正常了!

转载于:https://www.cnblogs.com/pengdonglin137/p/3478535.html

现在执行第一步时终端打印如下(base) casbot@casbot:~$ # 更新系统并安装编译工具 sudo apt update && sudo apt upgrade -y sudo apt install -y python3 python3-pip python3-rosdep python3-rosinstall-generator python3-vcstool build-essential sudo pip3 install osrf_pycommon # 安装关键兼容库(解决 std::shared_mutex 问题) sudo apt install -y libboost-all-dev libpoco-dev libtinyxml2-dev Ign:1 http://deb.repo.autolabor.com.cn jammy InRelease Ign:2 http://deb.repo.autolabor.com.cn jammy Release Ign:3 http://deb.repo.autolabor.com.cn jammy/main all Packages Ign:4 http://deb.repo.autolabor.com.cn jammy/main amd64 Packages Ign:5 http://deb.repo.autolabor.com.cn jammy/main Translation-en Hit:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy InRelease Ign:3 http://deb.repo.autolabor.com.cn jammy/main all Packages Hit:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-updates InRelease Ign:4 http://deb.repo.autolabor.com.cn jammy/main amd64 Packages Hit:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-backports InRelease Ign:5 http://deb.repo.autolabor.com.cn jammy/main Translation-en Ign:3 http://deb.repo.autolabor.com.cn jammy/main all Packages Hit:9 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-security InRelease Ign:10 https://mirrors.ustc.edu.cn/ros/ubuntu jammy InRelease Ign:4 http://deb.repo.autolabor.com.cn jammy/main amd64 Packages Get:11 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu jammy InRelease [4682 B] Err:12 https://mirrors.ustc.edu.cn/ros/ubuntu jammy Release 404 Not Found [IP: 202.141.176.110 443] Ign:5 http://deb.repo.autolabor.com.cn jammy/main Translation-en Ign:3 http://deb.repo.autolabor.com.cn jammy/main all Packages Hit:4 http://deb.repo.autolabor.com.cn jammy/main amd64 Packages Ign:5 http://deb.repo.autolabor.com.cn jammy/main Translation-en Ign:3 http://deb.repo.autolabor.com.cn jammy/main all Packages Ign:5 http://deb.repo.autolabor.com.cn jammy/main Translation-en Ign:3 http://deb.repo.autolabor.com.cn jammy/main all Packages Ign:5 http://deb.repo.autolabor.com.cn jammy/main Translation-en Ign:3 http://deb.repo.autolabor.com.cn jammy/main all Packages Ign:5 http://deb.repo.autolabor.com.cn jammy/main Translation-en Hit:13 http://packages.ros.org/ros/ubuntu focal InRelease Reading package lists... Done E: The repository 'https://mirrors.ustc.edu.cn/ros/ubuntu jammy Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.9ubuntu3). python3 is already the newest version (3.10.6-1~22.04.1). python3 set to manually installed. python3-pip is already the newest version (22.0.2+dfsg-1ubuntu0.6). python3-rosdep is already the newest version (0.26.0-1). python3-rosinstall-generator is already the newest version (0.1.23-1). python3-vcstool is already the newest version (0.3.0-1). 0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded. Collecting osrf_pycommon Downloading osrf_pycommon-2.0.2-py3-none-any.whl (36 kB) Installing collected packages: osrf_pycommon Successfully installed osrf_pycommon-2.0.2 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libicu-dev : Depends: libicu70 (= 70.1-2) but 70.1-2ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. (base) casbot@casbot:~$ 请给我成功安装ros1的完整步骤
最新发布
07-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值