1

openwrt 安装 tree

 2 years ago
source link: https://hellodk.cn/post/575
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

openwrt 安装 tree

opkg 源中 tree 的软件包名字就叫 tree

  1. 首先更新 opkg update
  2. 再安装 opkg install tree

出现错误,如下

# opkg install tree
Installing tree (1.8.0-1) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/packages/tree_1.8.0-1_x86_64.ipk
Installing libgcc1 (8.4.0-3) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/targets/x86/64/packages/libgcc1_8.4.0-3_x86_64.ipk
Collected errors:
* check_data_file_clashes: Package libgcc1 wants to install file /lib/libgcc_s.so.1
But that file is already provided by package * libgcc
* opkg_install_cmd: Cannot install package tree.

安装 tree 时依赖软件包libgcc1,这个软件包需要安装 /lib/libgcc_s.so.1 这个文件到系统,但是这个文件已经被 libgcc 这个已安装的软件包提供了,导致安装失败。

解决办法:

  1. 要么忽略依赖 对应 opkg install 的安装选项 --nodeps
  2. 要么覆盖这个文件,使用新安装的libgcc1中提供的/lib/libgcc_s.so.1 文件,将这个新文件安装到系统 对应 opkg install 的安装选项 --force-overwrite

首先选择忽略依赖,opkg install 时添加上--nodeps参数

# opkg install tree --nodeps
Installing tree (1.8.0-1) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/packages/tree_1.8.0-1_x86_64.ipk
Configuring tree.

哈,这就安装成功了~~~

/etc 下测试 tree 命令

root@dkRouter:/etc# tree ./opkg
./opkg
├── customfeeds.conf
└── distfeeds.conf
0 directories, 2 files

测试后没问题,end.

标签: Linux, 软路由, openwrt

本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK