Hㅏ... 언제나 그렇듯 결론은 간단하고 나는 열심히 삽질을 한다. 리눅스 접속시 VMware 가 아닌 간편하게 putty로 들어가는 방법에 대해 간략히 서술하겠다. 현재 리눅스에 접속할 때 항상 VMware를 써서 들어가는데 간단한 command 를 실행할 때도 이걸 써야하는게 귀찮았다. 로딩기다리기 싫잖아요 다들.. 그래서 putty로 간단히 접속하고 싶었다. 간단히 방법 요약 1. vmware 접속 2. $ sudo -s 3. $ sudo apt-get install ssh 4. $ sudo /etc/init.d/ssh restart 5. $ ifconfig ip 많기도하다... 이러면 무슨 아이피를 넣어야하나 증말 혼돈에 빠지는데 나는 저기서 ens33 의 inet addr:192.168.217...
1. Create a JSON file $ jq -n '{"hello":"world"}' > hello.json jq 라는 툴을 사용한다. 커널에 jq -h 해서 도움말을 보면 아래와 같이 나온다. jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the filter's results as JSON on standard output. 여기서 -n 태그의 의미는 use null as the single input value; $ jq -n --arg greeting world '{"hello":$greeting}' > hello.json --arg a v : set va..
Try command : $ curl -X POST -H "Content-Type: application/json" 'http://ubuntu:8999/api?aa=11&bb=22' python script: arg = request.argsProblem AttributeError : None type Cause ... I sent data in json format. but type of request.args is multiDict. That's why python can't find arg and occur AttributeError. Solved arg = request.json
Try $ docker-compose up -d Problem ERROR: Version in "./docker-compose.yml" is unsupported. Cause docker-compose v3 syntax is not supported by docker-compose until version 1.10.0. You'll need to update docker-compose to a newer version to get rid of that error. Current version is 1.16.1 Solved 기존에 sudo apt로 설치하면 옛날버전이 설치되기 때문에 지운다. $ sudo apt-get remove docker-compose curl을 이용하여 최신버전으로 설치 $ curl..
try 기본 flask파일을 실행하려함 $ python run.py Problem 분명 터미널에 파일이 위치하고있는데 못 찾음 FileNotFoundError:[Errno 2] No such file or directory: '/mnt/hgfs/jinie/flask_base/run.py Solved 방법1. app.run(debug=True) 를 False로 바꾸면 된다. 방법2. 디버그를 쓰려면 파일 실행시 $ python -m 파일명 하면 실행잘됨 관련 포스팅은 여기
Problem pip upgrade하던 도중 문제 발생 AttributeError: 'module' object has no attribute 'SSL_ST_INIT' Solved python 버전이 2.7과 3.5 두가지였다. default를 3.5로 변경 1. $ nano ~/.bashrc 2. type alias python=python3 alias pip=pip3 alias sudo='sudo' 3. source ~/.bashrcCheck $ python --version 전엔 2.7이 나왔는데 이젠 3.5로 나온다 Result $ pip install --upgrade pip Successfully installed pip-19.1.1