Alpine linux, 가장 뛰어난 최신 grep 버전

Alpine linux, 가장 뛰어난 최신 grep 버전

grepAlpine Docker 컨테이너에 호스트 OS v3.3 버전과 유사한 버전을 설치하고 싶습니다 . 인터넷으로 검색하던 중,패키지 이용 가능 여부 확인알프스의 경우. 단, 설치 시 버전 v3.1이 설치되어 있는지 확인하세요.

bash-4.4# grep --version
grep (GNU grep) 3.1
...

명시적인 설치가 필요할 수도 있고 버전을 지정하면 문제가 해결될 수도 있다고 생각했습니다. 그런 다음 다음을 시도합니다.

bash-4.4# apk add --no-cache grep=3.3-r0
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  grep-3.1-r2:
    breaks: world[grep=3.3-r0]
The command '/bin/sh -c apk add --no-cache bash grep=3.3-r0' returned a non-zero code: 1

공평하게 말하면 일부 다른 패키지는 이 버전의 grep에 명시적으로 의존한다고 생각합니다. 그림과 같이 패키지 정보를 찾는 명령어가 있습니다. 온라인으로 검색한 후 다음을 시도했습니다.

bash-4.4# apk info -a grep
WARNING: Ignoring APKINDEX.b89edf6e.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.737f7e01.tar.gz: No such file or directory
grep-3.1-r2 description:
Searches input files for lines containing a match to a specified pattern

grep-3.1-r2 webpage:
https://www.gnu.org/software/grep/grep.html

grep-3.1-r2 installed size:
192512

grep-3.1-r2 depends on:
so:libc.musl-x86_64.so.1
so:libpcre.so.1

grep-3.1-r2 provides:
cmd:egrep
cmd:fgrep
cmd:grep

grep-3.1-r2 is required by:

grep-3.1-r2 contains:
bin/grep
bin/egrep
bin/fgrep

grep-3.1-r2 triggers:

grep-3.1-r2 has auto-install rule:

grep-3.1-r2 affects auto-installation of:

grep-3.1-r2 replaces:

grep-3.1-r2 license:
GPL-3.0+

올바르게 읽으면 해당 버전에는 grep에 대한 요구 사항이 없습니다.

답변1

3.3 패키지는 grep다음에 적합합니다.가장자리풀어 주다,Alpine Linux의 개발 지점. 버전 3.9를 사용하고 있습니다.grep3.1 이 있습니다.

정말로 3.9 시스템에서 사용하고 싶다면 언제든지 관련 파일을 다운로드하여 다시 빌드할 수 있습니다.패키지 소스 코드그리고abuild올바른 작동.

관련 정보