성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Roll A Lisp In C - Reading ; https...
[정성태] Java - How to use the Foreign Funct...
[정성태] 제가 큰 실수를 했군요. ^^; Delegate를 통한 Bein...
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>Debian/Ubuntu 계열의 docker container에서 자주 설치하게 되는 명령어</h1> <p> 다음의 환경이 적용된 container에서,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>uname -a</span> Linux b5eddc1a9465 4.15.0-124-generic #127-Ubuntu SMP Fri Nov 6 10:54:43 UTC 2020 x86_64 GNU/Linux </pre> <br /> 우선 <a target='tab' href='https://www.sysnet.pe.kr/2/0/13075'>apt-get update/upgrade</a>를 먼저 해주고,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>apt-get update && apt-get -y upgrade</span> </pre> <br /> 이제 원하는 명령어 수행 시 오류가 발생하는 것에 따라 설치해 주면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>ps -a</span> bash: ps: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y procps</span> </pre> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>pstree -p</span> bash: pstree: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y psmisc</span> </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>ping ...</span> bash: ping: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y iputils-ping</span> # <span style='color: blue; font-weight: bold'>netstat ...</span> bash: netstat: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y net-tools</span> # <span style='color: blue; font-weight: bold'>ip ...</span> bash: ip: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y iproute2</span> $ <span style='color: blue; font-weight: bold'>ip6tables ...</span> bash: ip6tables: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y ip6tables</span> </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>strace</span> bash: strace: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y strace</span> </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>lsb_release -a</span> bash: lsb_release: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y lsb-release</span> </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>git ...</span> bash: git: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y git</span> </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>readelf</span> bash: readelf: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y binutils</span> </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>curl ...</span> bash: curl: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y curl</span> </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>sudo ls</span> bash: sudo: command not found # <span style='color: blue; font-weight: bold'>apt-get install sudo -y</span> </pre> <br /> 그런데 go의 경우에는 주의를 해야 합니다. apt-get을 이용해 그냥 설치하면,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>go ...</span> bash: go: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y golang</span> # <span style='color: blue; font-weight: bold'>go version</span> go version go1.11.6 linux/amd64 </pre> <br /> 예전 버전이 설치됩니다. 따라서 좀 번거롭지만 직접 다운로드해야 합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>VERSION="1.18.4"</span> # <span style='color: blue; font-weight: bold'>ARCH="amd64"</span> # <span style='color: blue; font-weight: bold'>curl -O -L "https://golang.org/dl/go${VERSION}.linux-${ARCH}.tar.gz"</span> # <span style='color: blue; font-weight: bold'>tar -xf "go${VERSION}.linux-${ARCH}.tar.gz"</span> # <span style='color: blue; font-weight: bold'>sudo mv -v go /usr/local</span> // ~/.bashrc에 저장 후 source로 반영 // 경우에 따라 로컬에 go가 설치된 경우 export PATH=$PATH...를 export PATH=...:$PATH로 우선 순위 변경 # <span style='color: blue; font-weight: bold'>export GOPATH=$HOME/go</span> # <span style='color: blue; font-weight: bold'>export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin</span> # <span style='color: blue; font-weight: bold'>go version</span> go version go1.18.4 linux/amd64 </pre> <br /> 참고로 docker container 내에서 snap으로 설치하려 들면,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > # <span style='color: blue; font-weight: bold'>snap install go</span> bash: snap: command not found # <span style='color: blue; font-weight: bold'>apt-get install -y snapd</span> # <span style='color: blue; font-weight: bold'>snap install go</span> error: cannot communicate with server: Post http://localhost/v2/snaps/go: dial unix /run/snapd.socket: connect: no such file or directory # <span style='color: blue; font-weight: bold'>systemctl status snapd</span> System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down </pre> <br /> 결국 <a target='tab' href='https://www.sysnet.pe.kr/2/0/13104'>systemd의 문제</a>부터 해결을 해야 합니다.<br /> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1213
(왼쪽의 숫자를 입력해야 합니다.)