Bug 12346 - [AnolisOS23] 软件包 hunspell-devel 在AnolisOS23中的行为异常
Summary: [AnolisOS23] 软件包 hunspell-devel 在AnolisOS23中的行为异常
Status: RESOLVED BYDESIGN
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: happy_orange
QA Contact: bolong_tbl
URL:
Whiteboard:
Keywords:
: 12347 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-12-12 16:23 UTC by young_estt
Modified: 2025-01-07 17:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description young_estt 2024-12-12 16:23:11 UTC
Description of problem:
使用sh执行命令时报错,retcode为1,使用bash时命令正常执行

Version-Release number of selected component (if applicable):


How reproducible:
在shell执行以下指令
$ docker pull registry.openanolis.cn/openanolis/anolisos:23
$ docker run -d registry.openanolis.cn/openanolis/anolisos:23 tail -f /dev/null
$ docker exec -it [docker_id] /bin/sh
$ yum install -y hunspell-devel
$ hunspell -D

Steps to Reproduce:
1.
2.
3.

Actual results:
retcode: 1
stdout:
stderr: SEARCH PATH:
.::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/root/.openoffice.org/3/user/wordbook:/root/.openoffice.org2/user/wordbook:/root/.openoffice.org2.0/user/wordbook:/root/Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
/usr/share/hunspell/en_GB
/usr/share/hunspell/en_US
Can't open affix or dictionary files for dictionary named "default".

Expected results:
retcode: 0

Additional info:
Comment 1 young_estt 2024-12-12 16:27:11 UTC
安装hunspell包后执行命令hunspell -D
Comment 2 gaochang alibaba_cloud_group 2025-01-07 17:07:47 UTC
该问题是由于 docker 使用的时候使用的是 sh 而不是 bash 导致的行为不同
容器中部分环境变量的配置是写在 .bashrc 中,因此使用 bash 可以正常加载完整的环境变量,而 sh 则不会加载 .bashrc
因此对于可以使用 /bin/bash 的场景则不建议继续使用 /bin/sh
Comment 3 gaochang alibaba_cloud_group 2025-01-07 17:10:20 UTC
*** Bug 12347 has been marked as a duplicate of this bug. ***