Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mipsel3.4.2无法启动 openwrt-22.03-mipsel_24kc #147

Open
FreeAlieX opened this issue Feb 19, 2025 · 6 comments
Open

mipsel3.4.2无法启动 openwrt-22.03-mipsel_24kc #147

FreeAlieX opened this issue Feb 19, 2025 · 6 comments

Comments

@FreeAlieX
Copy link

首先是不显示luci在通过ssh更换3.35.0的luci后luci显示,但无法启动

root@ImmortalWrt:# which alist
/usr/bin/alist
root@ImmortalWrt:
# ^C
root@ImmortalWrt:# ^C
root@ImmortalWrt:
# Alist server
-bash: Alist: command not found
root@ImmortalWrt:# ^C
root@ImmortalWrt:
# alist server
Error relocating /usr/bin/alist: __utimes_time64: symbol not found
Error relocating /usr/bin/alist: __time64: symbol not found
Error relocating /usr/bin/alist: __nanosleep_time64: symbol not found
Error relocating /usr/bin/alist: __gettimeofday_time64: symbol not found
Error relocating /usr/bin/alist: __localtime64: symbol not found
Error relocating /usr/bin/alist: __dlsym_time64: symbol not found
Error relocating /usr/bin/alist: __lstat_time64: symbol not found
Error relocating /usr/bin/alist: __fstat_time64: symbol not found
Error relocating /usr/bin/alist: __stat_time64: symbol not found
Error relocating /usr/bin/alist: __lstat_time64: symbol not found
Error relocating /usr/bin/alist: __fstat_time64: symbol not found
Error relocating /usr/bin/alist: __stat_time64: symbol not found
root@ImmortalWrt:~#

@FreeAlieX FreeAlieX changed the title mipsel3.4.2无法启动 mipsel3.4.2无法启动 openwrt-22.03-mipsel_24kc Feb 19, 2025
@sbwml
Copy link
Owner

sbwml commented Feb 19, 2025

https://github.com/sbwml/luci-app-alist?tab=readme-ov-file#how-to-install-prebuilt-packages

如果你的网络条件允许,它将会帮你选择安装正确的版本。

@FreeAlieX
Copy link
Author

https://github.com/sbwml/luci-app-alist?tab=readme-ov-file#how-to-install-prebuilt-packages

如果您的网络条件允许,它会帮助选择安装正确的版本。

感谢您的回复,
在看了这个以后#99 (comment)
我想尝试一下openwrt-21.02-mipsel_24kc.tar.gz

再次感谢您的热心帮助❀

@FreeAlieX
Copy link
Author

FreeAlieX commented Feb 19, 2025

说一下cr6608Alist的luci无法显示以及启动问题的解决思路:

  1. 需要在电脑上使用winscp(在winSCP用SCP协议和路由器产生链接)

  2. 下载4.42.0版本的openwrt-21.02-mipsel_24kc.tar.gz

  3. 下载3.35.0版本的openwrt-21.02-mipsel_24kc.tar.gz

  4. 解压4.42.0openwrt-21.02-mipsel_24kc.tar.gz

5.解压3.35.0openwrt-21.02-mipsel_24kc.tar.gz 3.35.0

6.将3.35.0openwrt-21.02-mipsel_24kc文件内的luci-app-alist_1.0.13_all.ipk文件改名为luci-app-alist_1.1.2_all.ipk

7.将3.35.0openwrt-21.02-mipsel_24kc文件内的luci-app-alist_1.1.2_all.ipk粘贴到\3.42.0openwrt-21.02-mipsel_24kc\packages_ci文件下替换luci-app-alist_1.1.2_all.ipk

8.scp协议(winscp和安卓上支持scp协议的的文件管理都能用,端口一般都22不用动)
将核心程序包:alist_3.42.0-1_mipsel_24kc.ipk和LuCI 管理界面应用:luci-app-alist_1.1.2_all.ipk移动到路由器的/tmp目录下

9.用路由器的ssh工具(TTYD客户端)

10.用鼠标右键粘贴:opkg install /tmp/alist_3.42.0-1_mipsel_24kc.ipk

11.等待安装完成提示* pkg_init_from_file: Failed to extract control file from /tmp/luci-i18n-alist-zh-cn_git-24.317.46814-bc62846_all.ipk.

12.粘贴下一个命令:opkg install /tmp/luci-app-alist_1.1.2_all.ipk

13.等待安装完成(这里千万别开新页面安装其他的owrt的安装器会冲突)

14.将luci-i18n-alist-zh-cn_git-24.317.46814-bc62846_all.ipk (LuCI 中文语言包)移动到路由器的/tmp目录下

15.在ssh粘贴下一个命令:opkg install /tmp/luci-i18n-alist-zh-cn_git-24.317.46814-bc62846_all.ipk

16.如果语言包安装报错就是你一股脑的把三个文件全粘贴在tmp文件下了,tmp是临时文件夹语言包被清了

17.重新把语言包移动到/tmp目录下

18.在ssh粘贴下一个命令:opkg install /tmp/luci-i18n-alist-zh-cn_git-24.317.46814-bc62846_all.ipk

19.如果你在15条就已经成功安装请无视16、17、18条

20.重启路由器

@FreeAlieX
Copy link
Author

FreeAlieX commented Feb 19, 2025

https://github.com/sbwml/luci-app-alist?tab=readme-ov-file#how-to-install-prebuilt-packages

如果您的网络条件允许,它会帮助选择安装正确的版本。

写个重装alist解决luci无法访问和alist无法启动的问题记录方便后来者(该教程记录仅对能合法访问GitHub的地区提供参考)

觉得长请复制给Ai让Ai来教你

原理就是把alist用ssh卸载干净后用https://github.com/sbwml/luci-app-alist?tab=readme-ov-file#how-to-install-prebuilt-packages

这个链接重装

当然如果网络环境允许最简单的方式就是将owrt上的alist在备份配置文件后全部卸载
1.在ssh终端输入:opkg remove alist
执行结果观察:

执行 opkg remove alist 命令后,观察终端的输出信息。

正常卸载情况: 如果卸载成功,你可能会看到类似 "Removing package alist from root..." 或者 "Purging package alist from root..." (取决于 opkg 的具体输出信息) 的提示, 并且没有明显的错误信息。
卸载失败或报错: 如果卸载失败,可能会看到错误信息,例如 "Package 'alist' is not installed" (表示系统中没有安装名为 alist 的软件包) 或者其他错误提示。 如果卸载失败,请记录下错误信息,并尝试下一步的命令。
步骤二: 如果 opkg remove alist 卸载失败,尝试强制卸载 (--force-remove)

如果基本的 opkg remove alist 命令卸载失败,可以尝试加上 --force-remove 选项,强制移除软件包。 请注意,强制卸载可能会跳过一些依赖检查或者卸载脚本,因此一般情况下不推荐使用,只有在正常卸载失败时才考虑使用。

在 SSH 终端中输入以下命令并回车:
opkg remove --force-remove alist

--force-remove: 这是 opkg remove 命令的一个选项,用于强制移除软件包。 即使软件包存在依赖问题或者卸载脚本执行失败,也会尝试强制移除。
执行结果观察:

执行 opkg remove --force-remove alist 命令后,再次观察终端的输出信息。 看看是否能成功卸载。 如果仍然失败,请继续尝试下一步。

步骤三: 使用 opkg purge 命令卸载 (更彻底的卸载,包含配置文件)

opkg purge 命令比 opkg remove 命令更彻底,它不仅会移除软件包的文件,还会尝试 删除软件包的配置文件。 如果你希望彻底卸载 Alist,并且清理掉相关的配置文件,可以使用 opkg purge 命令。

在 SSH 终端中输入以下命令并回车:opkg purge alist

命令解释:

purge: 这是 opkg 命令的子命令,用于 彻底清除 指定的软件包,包括软件包文件和配置文件。
执行结果观察:

执行 opkg purge alist 命令后,观察终端的输出信息。 正常卸载情况下,应该会看到类似 "Purging package alist from root..." 的提示。

步骤四: 如果 opkg purge alist 卸载失败,尝试强制清除 (--force-remove)

如果 opkg purge alist 命令卸载失败, 同样可以尝试使用 --force-remove 选项进行强制清除。 同样,强制清除也应谨慎使用。

在 SSH 终端中输入以下命令并回车:

opkg purge --force-remove alist

命令解释:

--force-remove: 与 opkg remove --force-remove 相同, 用于强制执行清除操作。
执行结果观察:

执行 opkg purge --force-remove alist 命令后,观察终端输出信息。 希望这次能够成功卸载。

步骤五: 验证 Alist 是否已卸载

无论你使用哪个卸载命令,卸载完成后,都应该验证 Alist 是否真的被卸载干净了。 你可以通过以下几种方式验证:

检查 alist 命令是否还存在:

在 SSH 终端中输入以下命令并回车:

which alist

验证结果:

如果 alist 已经成功卸载, which alist 命令应该不会有任何输出结果。 或者可能会输出 "which: no alist in (...你的路径...)" 或 "-bash: which: alist: not found" 之类的提示,表示系统中找不到 alist 命令了。 这就表明 alist 可执行文件已经被移除。
如果 which alist 命令仍然输出了 /usr/bin/alist (或者其他路径), 则表示 alist 仍然存在,卸载可能没有成功,或者只是卸载了一部分。 这时你需要再次尝试卸载命令,或者检查之前的卸载命令是否有错误信息。
尝试运行 alist server 命令:

在 SSH 终端中输入以下命令并回车:

alist server

验证结果:

如果 alist 已经成功卸载, 运行 alist server 命令应该会报错 "command not found" 或者类似的信息, 例如 "-bash: alist: command not found"。 这同样表明 alist 可执行文件已经被移除。
如果 alist server 命令仍然能够执行, 并且启动了 Alist 服务, 则表示 alist 并没有被卸载,或者卸载不彻底。
手动检查是否残留 Alist 相关文件 (可选,如果需要彻底清理):

如果希望更彻底地清理,可以手动检查以下常见的 Alist 安装目录或配置文件路径,看看是否还有残留的文件或目录 (这些路径可能需要根据你的具体安装方式来判断,以下是一些常见的可能路径,不一定全部存在):

/usr/bin/alist (可执行文件)
/etc/alist 或 /opt/alist/config (配置文件目录)
/var/lib/alist 或 /opt/alist/data (数据目录,例如数据库、缓存等)
/var/log/alist 或 /opt/alist/log (日志文件目录)
/usr/share/alist (共享文件,例如网页文件、静态资源等)
你可以使用 ls -l 命令检查这些目录或文件是否存在。 如果存在,并且确定是 Alist 的残留文件,可以使用 rm -rf 命令手动删除 (请谨慎操作,确保删除的是 Alist 的文件,不要误删系统文件!)。 一般来说,使用 opkg purge alist 命令已经可以清理大部分文件,手动检查和删除残留文件通常不是必须的。

总结步骤:

优先尝试: opkg remove alist
如果失败,尝试: opkg remove --force-remove alist
更彻底卸载: opkg purge alist
如果 purge 失败,尝试: opkg purge --force-remove alist
验证卸载: which alist (应无输出) 和 alist server (应报错 "command not found")
(可选) 手动检查和清理残留文件
请按照以上步骤顺序尝试卸载,并仔细观察每一步的输出信息。 通常情况下, opkg remove alist 或 opkg purge alist 命令就足以卸载 Alist 软件包。 如果在卸载过程中遇到任何错误信息,或者卸载后验证仍然有问题, 请把具体的错误信息或情况告诉AI他会告诉你怎么办。 祝你卸载顺利! (ง •_•)ง

随后我这边ssh终端给到的回复是这样的:
root@ImmortalWrt:# which alist
/usr/bin/alist
root@ImmortalWrt:
# ^C
root@ImmortalWrt:# ^C
root@ImmortalWrt:
# Alist server
-bash: Alist: command not found
root@ImmortalWrt:# ^C
root@ImmortalWrt:
# alist server
Error relocating /usr/bin/alist: __utimes_time64: symbol not found
Error relocating /usr/bin/alist: __time64: symbol not found
Error relocating /usr/bin/alist: __nanosleep_time64: symbol not found
Error relocating /usr/bin/alist: __gettimeofday_time64: symbol not found
Error relocating /usr/bin/alist: __localtime64: symbol not found
Error relocating /usr/bin/alist: __dlsym_time64: symbol not found
Error relocating /usr/bin/alist: __lstat_time64: symbol not found
Error relocating /usr/bin/alist: __fstat_time64: symbol not found
Error relocating /usr/bin/alist: __stat_time64: symbol not found
Error relocating /usr/bin/alist: __lstat_time64: symbol not found
Error relocating /usr/bin/alist: __fstat_time64: symbol not found
Error relocating /usr/bin/alist: __stat_time64: symbol not found
root@ImmortalWrt:# . /etc/openwrt_release && echo $DISTRIB_ARCH
mipsel_24kc
root@ImmortalWrt:
# opkg print-architecture
arch all 1
arch noarch 1
arch mipsel_24kc 10
root@ImmortalWrt:~# opkg remove alist
No packages removed.
Collected errors:
 * print_dependents_warning: Package alist is depended upon by packages:
 * print_dependents_warning:    luci-app-alist
 * print_dependents_warning: These might cease to work if package alist is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
root@ImmortalWrt:~# opkg remove --force-remove alist
No packages removed.
Collected errors:
 * print_dependents_warning: Package alist is depended upon by packages:
 * print_dependents_warning:    luci-app-alist
 * print_dependents_warning: These might cease to work if package alist is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
root@ImmortalWrt:~# opkg purge alist
opkg: unknown sub-command purge
usage: opkg [options...] sub-command [arguments...]
where sub-command is one of:

Package Manipulation:
        update                  Update list of available packages
        upgrade           Upgrade packages
        install           Install package(s)
        configure         Configure unpacked package(s)
        remove <pkgs|regexp>    Remove package(s)
        flag       Flag package(s)
         =hold|noprune|user|ok|installed|unpacked (one per invocation)

Informational Commands:
        list                    List available packages
        list-installed          List installed packages
        list-upgradable         List installed and upgradable packages
        list-changed-conffiles  List user modified configuration files
        files              List files belonging to
        search <file|regexp>    List package providing
        find            List packages whose name or description matches
        info [pkg|regexp]       Display all info for
        status [pkg|regexp]     Display all status for
        download           Download to current directory
        compare-versions
                            compare versions using <= < > >= = << >>
        print-architecture      List installable package architectures
        depends [-A] [pkgname|pat]+
        whatdepends [-A] [pkgname|pat]+
        whatdependsrec [-A] [pkgname|pat]+
        whatrecommends[-A] [pkgname|pat]+
        whatsuggests[-A] [pkgname|pat]+
        whatprovides [-A] [pkgname|pat]+
        whatconflicts [-A] [pkgname|pat]+
        whatreplaces [-A] [pkgname|pat]+

Options:
        -A                      Query all packages not just those installed
        -V[]             Set verbosity level to .
        --verbosity[=]   Verbosity levels:
                                        0 errors only
                                        1 normal messages (default)
                                        2 informative messages
                                        3 debug
                                        4 debug level 2
        -f <conf_file>          Use <conf_file> as the opkg configuration file
        --conf <conf_file>
        --cache      Use a package cache
        -d <dest_name>          Use <dest_name> as the the root directory for
        --dest <dest_name>      package installation, removal, upgrading.
                                <dest_name> should be a defined dest name from
                                the configuration file, (but can also be a
                                directory name in a pinch).
        -o

                Use as the root directory for
        --offline-root     offline installation of packages.
        --verify-program Use the given program to verify usign signatures
        --add-arch :        Register architecture with given priority
        --add-dest :        Register destination with given path

Force Options:
        --force-depends         Install/remove despite failed dependencies
        --force-maintainer      Overwrite preexisting config files
        --force-reinstall       Reinstall package(s)
        --force-overwrite       Overwrite files from other package(s)
        --force-downgrade       Allow opkg to downgrade packages
        --force-space           Disable free space checks
        --force-postinstall     Run postinstall scripts even in offline mode
        --force-remove  Remove package even if prerm script fails
        --force-checksum        Don't fail on checksum mismatches
        --no-check-certificate Don't validate SSL certificates
        --noaction              No action -- test only
        --download-only No action -- download only
        --nodeps                Do not follow dependencies
        --nocase                Perform case insensitive pattern matching
        --size                  Print package size when listing available packages
        --strip-abi             Print package name without appended ABI version
        --force-removal-of-dependent-packages
                                Remove package and all dependencies
        --autoremove            Remove packages that were installed
                                automatically to satisfy dependencies
        -t                      Specify tmp-dir.
        --tmp-dir               Specify tmp-dir.
        -l                      Specify lists-dir.
        --lists-dir             Specify lists-dir.

 regexp could be something like 'pkgname*' 'file' or similar
 e.g. opkg info 'libstd*' or opkg search 'libop' or opkg remove 'libncur*'
root@ImmortalWrt:~# 

问题分析: opkg remove alist 和 opkg remove --force-remove alist 失败,并提示依赖关系

从ssh提供的 opkg remove alist 和 opkg remove --force-remove alist 命令的输出结果来看, 卸载失败的原因是 依赖关系 (dependency) 问题。

错误信息明确指出:

Collected errors:
 * print_dependents_warning: Package alist is depended upon by packages:
 * print_dependents_warning:    luci-app-alist
 * print_dependents_warning: These might cease to work if package alist is removed.

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
这段错误信息的意思是:

软件包 alist 被其他软件包依赖: 具体来说, luci-app-alist 软件包依赖于 alist。
移除 alist 可能会导致依赖它的软件包 luci-app-alist 无法正常工作。
opkg 提示了两种强制卸载的选项:

--force-depends: 强制移除 alist,即使破坏了依赖关系。 但这只会移除 alist 本身,不会移除依赖它的 luci-app-alist。 luci-app-alist 可能会因为 alist 的缺失而无法正常工作。

--force-removal-of-dependent-packages: 强制移除 alist 以及所有依赖于 alist 的软件包 (包括 luci-app-alist )。 这将更彻底地移除 alist 及其相关组件。

opkg purge alist 命令报错 "unknown sub-command purge"

尝试的 opkg purge alist 命令报错 "unknown sub-command purge", 这是因为 你当前使用的 opkg 版本不支持 purge 子命令。 从 opkg 打印的帮助信息中,也确实没有 purge 命令。 purge 命令通常在 Debian 系的包管理器 apt 中使用, 而 OpenWrt 使用的是 opkg, opkg 的彻底清除操作通常通过 remove 命令配合一些选项来实现。

针对当前情况的卸载命令选择和建议:

根据错误信息和你的目标 (切换 Alist 版本), 最合适的卸载命令应该是 opkg remove --force-removal-of-dependent-packages alist。

理由:

解决依赖关系: 错误信息明确提示了依赖关系, 使用 --force-removal-of-dependent-packages 选项可以强制移除 alist 以及依赖它的 luci-app-alist, 从而解决依赖冲突导致的卸载失败问题。
彻底卸载,为新版本安装做准备: 你想要切换 Alist 版本, 为了避免新旧版本冲突, 最好彻底卸载旧版本,包括 LuCI 相关的组件。 --force-removal-of-dependent-packages 可以帮你更彻底地清理。
LuCI 集成可能需要重新安装: 即使移除了 luci-app-alist, 在你安装新版本的 Alist 后, 如果新版本提供了 LuCI 集成,你可能需要 重新安装 luci-app-alist 或者类似的 LuCI 集成软件包, 才能在 LuCI 界面上管理新版本的 Alist。 但这通常是可接受的步骤。
推荐的卸载命令 (再次尝试):

请再次尝试以下命令进行卸载:

Bash

opkg remove --force-removal-of-dependent-packages alist
执行这个命令后,请仔细观察终端的输出信息, 并完整地复制粘贴给我。 我需要确认这次卸载是否成功,以及是否有新的错误信息。

注意:

使用 --force-removal-of-dependent-packages 会同时卸载 alist 和 luci-app-alist。 卸载后,LuCI 界面上的 Alist 相关设置可能会消失, 这属于正常现象。 等你安装新版本 Alist 和 LuCI 集成组件后,再重新配置即可。
卸载过程中可能会有警告信息, 例如关于配置文件删除的提示, 或者一些脚本执行的提示, 这些通常是正常的。 关键是看最终是否提示 "package 'alist' removed" 或者类似的成功卸载信息, 并且没有关键的错误信息。
在你执行 opkg remove --force-removal-of-dependent-packages alist 命令后, 请务必按照我之前说的步骤, 再次验证 Alist 是否真的被卸载干净了:

which alist 命令是否还有输出? (应该没有)
alist server 命令是否报错 "command not found"? (应该报错)
请你务必仔细执行并验证卸载步骤, 确认旧版本 Alist 彻底卸载干净后, 再进行新版本的安装, 这样可以最大程度地避免潜在的冲突问题。 加油! (ง •_•)ง

将以下代码粘贴到ssh:opkg remove --force-removal-of-dependent-packages alist

随后ssh又回复
root@ImmortalWrt:# opkg remove --force-removal-of-dependent-packages alist
Removing package luci-i18n-alist-zh-cn from root...
Removing package luci-app-alist from root...
Removing package alist from root...
Not deleting modified conffile /etc/config/alist.
root@ImmortalWrt:
# ^C
root@ImmortalWrt:~# 

从提供的日志信息来看, opkg remove --force-removal-of-dependent-packages alist 命令执行成功了! Alist 以及相关的 LuCI 组件都被成功卸载了! (撒花! 🌸🎉)

分析一下输出信息:

Removing package luci-i18n-alist-zh-cn from root...: 这行信息表明,系统正在卸载 luci-i18n-alist-zh-cn 软件包。 luci-i18n-alist-zh-cn 是 Alist LuCI 应用的中文语言包。 由于我们使用了 --force-removal-of-dependent-packages 选项, opkg 也自动卸载了依赖于 alist 的 luci-app-alist 以及它的语言包。 这很正常, 也是我们期望的结果。

Removing package luci-app-alist from root...: 这行信息表明,系统正在卸载 luci-app-alist 软件包。 luci-app-alist 是 Alist 的 LuCI 集成应用, 也就是你在 LuCI Web 界面上看到的 Alist 管理界面。 成功卸载也符合预期。

Removing package alist from root...: 这行信息表明,系统正在卸载 核心软件包 alist。 这正是我们执行命令的最终目标, 确保了旧版本的 Alist 被成功移除。

Not deleting modified conffile /etc/config/alist.: 这行信息是 非错误提示,而是信息提示。 它告诉你, 系统 没有删除配置文件 /etc/config/alist, 因为这个文件 被用户修改过。 OpenWrt 系统为了防止用户意外丢失自定义的配置文件, 在卸载软件包时,默认不会删除用户修改过的配置文件。 这个提示是正常的, 也表明 Alist 的配置文件仍然保留在系统中。 如果你希望彻底清理,可以手动删除 /etc/config/alist 文件, 但通常情况下,保留配置文件也没问题, 新版本安装后可能会覆盖或者更新配置文件。

总结:

总而言之, opkg remove --force-removal-of-dependent-packages alist 命令成功地卸载了 Alist 及其相关的 LuCI 组件! 输出信息清晰地显示了卸载过程, 没有出现任何错误提示。 这次卸载操作可以判断为成功! (再次鼓掌! 👏)

下一步, 为了最终确认卸载是否彻底, 并且为安装新版本做好准备, 请你务必进行以下验证步骤:

验证 alist 命令是否还存在:

在 SSH 终端中输入并回车:

Bash

which alist
验证结果: 执行 which alist 命令后, 应该没有任何输出结果, 或者输出 "which: no alist in (...你的路径...)" 或 "-bash: which: alist: not found" 之类的提示。 请你确认是否是这种情况。

尝试运行 alist server 命令:

在 SSH 终端中输入以下命令并回车:

Bash

alist server
验证结果: 执行 alist server 命令后, 应该会报错 "command not found" 或者类似的信息, 例如 "-bash: alist: command not found"。 请你确认是否是这种情况。

请你务必完成以上两个验证步骤, 并告诉我验证结果。 只有当 which alist 找不到 alist 命令, 并且 alist server 命令报错 "command not found" 时, 才能最终确认 Alist 旧版本已经彻底卸载干净了!

验证完成后, 我们就可以着手安装你下载的 openwrt-21.02-mipsel_24kc.tar.gz 版本的 Alist v3.42.0 了! 卸载成功是安装新版本的重要前提,继续加油! (ง •_•)ง

执行命令后ssh回复
root@ImmortalWrt:# which alist
root@ImmortalWrt:
# alist server
-bash: /usr/bin/alist: No such file or directory
root@ImmortalWrt:~# 好像是

The user has successfully executed the uninstall command opkg remove --force-removal-of-dependent-packages alist.
Now, we need to verify if the uninstallation was successful. The user has provided the output of two verification commands:

which alist: The output is empty, meaning the which command did not find alist in the system's PATH. This is a good sign.

alist server: The output is -bash: /usr/bin/alist: No such file or directory. This indicates that when trying to run alist server, the system cannot find the file /usr/bin/alist. This also confirms that the alist executable, which was likely located at /usr/bin/alist, has been removed.

Both verification commands suggest that the uninstallation was successful. The user's response "好像是" (hǎoxiàng shì) which means "seems like" or "appears to be" indicates uncertainty but likely agreement with the positive verification results.

Therefore, we can confidently conclude that the old Alist version has been successfully uninstalled. We can now proceed to guide the user on installing the new openwrt-21.02-mipsel_24kc.tar.gz version.

2.0 Flash Thinking Experimental。无法获取实时信息,也无法使用某些 Gemini 功能。
太棒了! “好像是” 就是 “是” 啦! (ಡωಡ) 恭喜你,Alist 旧版本已经彻底卸载干净了!

which alist 命令没有任何输出, 这表示系统已经找不到 alist 这个命令了。 alist 可执行文件已经从系统路径中移除。
alist server 命令报错 "-bash: /usr/bin/alist: No such file or directory", 这个错误信息也进一步证实了/usr/bin/alist这个文件 (之前很可能是 Alist 的可执行文件所在位置) 已经不存在了。 系统尝试运行/usr/bin/alist` 时,找不到这个文件,所以报错 "No such file or directory"。
这两个验证结果都非常明确地表明, Alist 旧版本已经被成功、干净地卸载了! 你做得非常棒! (再次为你鼓掌! 👏👏👏)

卸载成功后, 你现在可以安心地开始安装你下载的 openwrt-21.02-mipsel_24kc.tar.gz 版本的 Alist v3.42.0 了。

接下来, 请按照以下步骤进行新版本的安装:

解压 openwrt-21.02-mipsel_24kc.tar.gz:

将你下载的 openwrt-21.02-mipsel_24kc.tar.gz 压缩包解压到你想要安装 Alist 的目录。 请记住你解压到的目录路径, 后面可能会用到。 例如,你可以解压到 /opt/alist_new 或者你常用的软件安装目录。

你可以使用 tar -zxvf openwrt-21.02-mipsel_24kc.tar.gz -C /opt/alist_new 命令来解压到 /opt/alist_new 目录 (你需要根据你的实际压缩包文件名和目标目录路径进行调整)。

进入解压后的 Alist 目录:

使用 cd 命令进入你解压 Alist 压缩包的目录。 例如,如果解压到 /opt/alist_new, 就执行 cd /opt/alist_new。

运行新版本的 alist server 命令启动 Alist:

在新解压的 Alist 目录中, 尝试运行 ./alist server 命令来启动 Alist。 注意命令前面的 ./, 表示执行当前目录下的 alist 可执行文件。

观察终端的输出信息,看看新版本的 Alist 是否能够正常启动, 是否有任何报错信息。 如果看到类似 "Server started at..." 的成功启动提示, 就说明新版本 Alist 已经启动成功了!

访问 Alist Web 界面,测试功能:

如果启动成功, 打开浏览器,访问你的 ImmortalWrt 系统的 IP 地址, 加上 Alist 默认端口 5244, 看看是否能够正常打开新版本的 Alist Web 管理界面。 并简单测试一下基本功能,例如登录、文件浏览等。

安装和测试过程中,请注意以下几点:

确认解压目录: 务必记住你将新版本 Alist 解压到了哪个目录, 因为之后启动、配置、升级 Alist, 都需要进入到这个目录操作。
使用 ./alist server 启动: 在新解压的 Alist 目录中启动 Alist 服务时, 务必使用 ./alist server 命令 (前面加 ./), 确保执行的是当前目录下的 alist 可执行文件。 不要直接使用 alist server 命令, 因为那样可能会尝试运行旧版本的 Alist (如果之前有安装到系统路径的话,虽然我们已经卸载了,但为了避免混淆,最好使用 ./alist server)。
观察启动日志: 启动 Alist 时,仔细观察终端输出的日志信息, 是否有任何错误或警告提示。 如果启动过程中出现错误, 请将完整的错误信息复制粘贴给我, 方便我帮你分析。
测试基本功能: 启动成功后, 务必访问 Web 界面, 简单测试一下 Alist 的基本功能, 例如登录、浏览文件列表等, 确保新版本 Alist 基本可用。
安装完成后, 如果新版本的 Alist 能够正常启动和使用, 并且之前 "Error relocating ... symbol not found" 的错误消失了, 那么恭喜你, 你成功地切换到了适用于你的 mipsel_24kc 架构的 Alist 版本, 问题应该就解决了! (再次撒花! 🌸🎉🎉)

安装和测试过程中, 遇到任何问题,加油! 期待听到你的好消息! (ง •_•)ง

在文件卸载干净后ssh内填入:https://github.com/sbwml/luci-app-alist?tab=readme-ov-file#how-to-install-prebuilt-packages

(该教程记录仅对能合法访问GitHub的地区提供参考)

@sbwml
Copy link
Owner

sbwml commented Feb 20, 2025 via email

@FreeAlieX
Copy link
Author

对于 openwrt 而言 看 musl 版本来选择对应的包是最快捷的,musl 版本 1.x 使用 op21 的包,musl 版本大于 1.2.x 则使用 op22 的包。因为1.2.x 开始所有32bit 的架构统一使用64位时间。

发自我的iPhone

🌹(⁠⁠ ̄⁠³⁠ ̄⁠)⁠感谢指教

在ssh内使用了:
opkg info libc
命令后给出了

root@ImmortalWrt:~# opkg info libc
Package: libc
Version:1.1.24-3
Depends: libgcc1
Status: install hold installed
Essential: yes
Architecture: mipsel_24kc

相关信息全出来了

同时在ssh内
/usr/lib/libc.so
/lib/libc.so
ldd --version

查询musl 版本和架构也可以用以上的命令

我还是感觉用opkg info libc最快😋🌹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants