安装laradock时,报错/tmp/sources.sh: not found怎么办

在Laradock安装过程中遇到docker-compose up -d nginx mysql redis命令报错时,可通过修改workspace目录下的sources.sh文件格式为Unix解决。具体操作为使用gitbash工具,输入vimsources.sh命令,将文件格式从dos改为unix,保存并重新执行docker-compose命令。

在安装laradock的时候,如果是在

docker-compose up -d nginx mysql redis

这里出现如下报错的时候,
在这里插入图片描述
这时候,进入laradock/workspace目录,用可以使用git bash工具,然后输入
vim sources.sh命令,如果高亮块显示的是sources.sh[dos]的字样,则直接输入:set ff=unix回车,然后输入:wq回车,然后在执行上一条docker命令就好了。

dikke@dikke-VMware-Virtual-Platform:~/ros2_ws$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' dikke@dikke-VMware-Virtual-Platform:~/ros2_ws$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). Executing: /tmp/apt-key-gpghome.QQk47ebz8h/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 gpg: 密钥 F42ED6FBAB17C654:公钥 “Open Robotics <info@osrfoundation.org>” 已导入 gpg: 处理的总数:1 gpg: 已导入:1 dikke@dikke-VMware-Virtual-Platform:~/ros2_ws$ sudo apt update 命中:1 http://security.ubuntu.com/ubuntu noble-security InRelease 命中:2 http://packages.osrfoundation.org/gazebo/ubuntu-stable noble InRelease 获取:3 http://mirrors.ubuntu.com/mirrors.txt Mirrorlist [34 B] 命中:4 http://archive.ubuntu.com/ubuntu noble InRelease 忽略:7 http://packages.ros.org/ros/ubuntu noble InRelease 命中:5 http://archive.ubuntu.com/ubuntu noble-updates InRelease 命中:6 http://archive.ubuntu.com/ubuntu noble-backports InRelease 命中:8 http://packages.ros.org/ros2/ubuntu noble InRelease 错误:9 http://packages.ros.org/ros/ubuntu noble Release 404 Not Found [IP: 64.50.236.52 80] 正在读取软件包列表... 完成 E: 仓库 “http://packages.ros.org/ros/ubuntu noble Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
09-01
(base) casbot@casbot:~$ sudo sh -c 'echo "deb [trusted=yes arch=amd64] http://deb.repo.autolabor.com.cn jammy main" > /etc/apt/sources.list.d/autolabor.list' (base) casbot@casbot:~$ sudo apt update 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 Hit:9 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-security InRelease 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:10 https://mirrors.ustc.edu.cn/ros/ubuntu jammy InRelease Ign:5 http://deb.repo.autolabor.com.cn jammy/main Translation-en Get:11 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu jammy InRelease [4682 B] Ign:3 http://deb.repo.autolabor.com.cn jammy/main all Packages Err:12 https://mirrors.ustc.edu.cn/ros/ubuntu jammy Release 404 Not Found [IP: 202.141.176.110 443] Hit:4 http://deb.repo.autolabor.com.cn jammy/main amd64 Packages Ign:5 http://deb.repo.autolabor.com.cn jammy/main Translation-en Hit:13 http://packages.ros.org/ros/ubuntu focal InRelease 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 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. (base) casbot@casbot:~$ # 临禁用问题源 sudo mv /etc/apt/sources.list.d/autolabor.list /tmp/ sudo apt update # 重新添加源(使用备用地址) sudo sh -c 'echo "deb [trusted=yes] https://mirror.autolabor.com.cn/ros-noetic jammy main" > /etc/apt/sources.list.d/autolabor.list' Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy InRelease Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-updates InRelease Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-backports InRelease Hit:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-security InRelease Ign:5 https://mirrors.ustc.edu.cn/ros/ubuntu jammy InRelease Get:6 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu jammy InRelease [4682 B] Err:7 https://mirrors.ustc.edu.cn/ros/ubuntu jammy Release 404 Not Found [IP: 202.141.176.110 443] Hit:8 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. (base) casbot@casbot:~$ sudo apt install ros-noetic-autolabor -y Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package ros-noetic-autolabor (base) casbot@casbot:~$ sudo apt update && sudo apt install -y \ python3 python3-pip git cmake build-essential \ libboost-all-dev libeigen3-dev Ign:1 https://mirror.autolabor.com.cn/ros-noetic jammy InRelease Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy InRelease Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-updates InRelease Hit:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-backports InRelease Ign:5 https://mirrors.ustc.edu.cn/ros/ubuntu jammy InRelease Hit:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports jammy-security InRelease Err:7 https://mirrors.ustc.edu.cn/ros/ubuntu jammy Release 404 Not Found [IP: 202.141.176.110 443] Get:8 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu jammy InRelease [4682 B] Hit:9 http://packages.ros.org/ros/ubuntu focal InRelease Ign:1 https://mirror.autolabor.com.cn/ros-noetic jammy InRelease Ign:1 https://mirror.autolabor.com.cn/ros-noetic jammy InRelease Err:1 https://mirror.autolabor.com.cn/ros-noetic jammy InRelease Could not resolve 'mirror.autolabor.com.cn' 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.
07-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值