Linux学习-/bin/bash丢失解决方法

如不小心,删除了系统中的/bin/bash程序,系统将无法正常启动,可以通过光盘启动,进入紧急救援模式重新安装bash即可,操作过程如下:

  1. 按F2进入BIOS设置系统启动顺序,将Boot下面的CD-ROM Driver调整到最上面,然后保存退出。
    在这里插入图片描述
  2. 选择Resue installed system选择,进入紧急救援模式
    在这里插入图片描述
  3. 选择相应的配置
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
  4. 先挂载光盘,然后进入软件包目录,进入bash的安装,指定root目录将bash安装到源系统的根目录下
    在这里插入图片描述
  5. 安装完成后,切根查看是否正常,正常后,重新启动系统即可。
    在这里插入图片描述
/home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: warning: libc.so, needed by ../lib/libxml2.so, not found (try using -rpath or -rpath-link) /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `sinh' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `log2' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `atan2' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `tanh' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `atanh' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `cosh' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libxml2.so: undefined reference to `fmod' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `acosh' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `acos' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `sin' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `atan' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `asin' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `exp' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `trunc' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `tan' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `cos' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `log' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libxml2.so: undefined reference to `pow' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libxml2.so: undefined reference to `log10' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `sqrt' /home/yzf/env/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-gnu/12.3.0/../../../../aarch64-openwrt-linux-gnu/bin/ld: ../lib/libsqlite3.so: undefined reference to `asinh' collect2: error: ld returned 1 exit status
最新发布
11-14
(base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ /bin/echo 'export PATH="/bin:/usr/bin:/sbin:/usr/sbin:$ PATH"' >> ~/.bashrc (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ /bin/bash -c "source ~/.bashrc" (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ /bin/ls -l /bin/bash -rwxr-xr-x 1 root root 1446024 3月 31 2024 /bin/bash (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:$ PATH" (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ /bin/echo $ PATH $ PATH (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ /usr/bin/which bash /bin/bash (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ /bin/bash --version GNU bash,版本 5.2.21(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2022 自由软件基金会 许可证 GPLv3+:GNU GPL 许可证第三版或者更新版本 <http://gnu.org/licenses/gpl.html> 本软件是自由软件,您可以自由地更改和重新发布。 在法律许可的情况下特此明示,本软件不提供任何担保。 (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ echo 'export PYENV_ROOT="$ HOME/.pyenv"' >> ~/.bashrc (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ echo 'command -v pyenv >/dev/null || export PATH="$ PYENV_ROOT/bin:$ PATH"' >> ~/.bashrc (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc (base) lenovo@lenovo-ThinkStation-P2-Tower:/mnt/940660EA0660CEB4/PTM-POSE$ source ~/.bashrc 找不到命令 “pyenv”,您的意思是: “p7env” 命令来自 Debian 软件包 libnss3-tools (2:3.96.1-1) 尝试 sudo apt install <deb name> /usr/bin/env: "bash": 没有那个文件或目录 /usr/bin/env: "bash": 没有那个文件或目录 找不到命令 “pyenv”,您的意思是: “p7env” 命令来自 Debian 软件包 libnss3-tools (2:3.96.1-1) 尝试 sudo apt install <deb name>
07-10
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值