멀쩡(?)할때 받아도 드럽게 아픈게 그거라

갈비뼈도 확실히 붙지 않은 상태에서 치료 받기에는 겁난다 -_-

그렇다고 해서 안 받자니.. 다리 깁스 풀기 전에 어깨가 안나을거 같은디..

Posted by 구차니

머.. 재택이고 출근이 늦은 회사라

늦게 출근하고 그런게 없어서 아쉽지만

 

올해도 나쁜소식 없이 좋은일만 가득한 수능이 되길

 

 

이제 10년 남짓 남은건가 ㅠㅠ

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

체외충격파.. 으아아  (0) 2023.11.16
체외충격파는 아직 무서워  (0) 2023.11.15
딸래미 생일 그리고 스타필드  (0) 2023.11.11
어깨 떄문에 뒷목이 아프다 ㅠㅠ  (0) 2023.10.28
통깁스  (0) 2023.10.26
Posted by 구차니
하드웨어/RAID2023. 11. 14. 14:51

엥... 시스템이 날아갔다?

 

ubunut 20.04 에서 했는데

Download MSM for Ubuntu and Debian release MR 6.7

[링크 : https://www.broadcom.com/support/knowledgebase/1211161500881/how-do-i-install-msm-on-a-ubuntu-64bit-os]

 

$ wget ftp://tsupport:tsupport@ftp0.broadcom.com/private/MSM/64bit-MSM_6.7_for_Ubuntu_Debian.tgz
--2023-11-14 14:42:43--  ftp://tsupport:*password*@ftp0.broadcom.com/private/MSM/64bit-MSM_6.7_for_Ubuntu_Debian.tgz
           => `64bit-MSM_6.7_for_Ubuntu_Debian.tgz'
ftp0.broadcom.com (ftp0.broadcom.com)을(를) 해석하는 중... 192.19.229.165
접속 ftp0.broadcom.com (ftp0.broadcom.com)|192.19.229.165|:21... 접속됨.
tsupport(으)로 로그 저장하는 중... 로그인 완료!
==> SYST ... 완료.    ==> PWD ... 완료.
==> TYPE I ... 완료.  ==> CWD (1) /private/MSM ... 완료.
==> SIZE 64bit-MSM_6.7_for_Ubuntu_Debian.tgz ... 64517549
==> PASV ... 완료.    ==> RETR 64bit-MSM_6.7_for_Ubuntu_Debian.tgz ... 완료.
길이: 64517549 (62M) (인가받지 않음)

64bit-MSM_6.7_for_U 100%[===================>]  61.53M  10.1MB/s    / 7.5s     s

2023-11-14 14:42:53 (8.18 MB/s) - `64bit-MSM_6.7_for_Ubuntu_Debian.tgz' 저장함 [64517549]

minimonk@ministor:~$ ll
합계 63116
drwxr-xr-x 17 minimonk minimonk     4096 11월 14 14:42 ./
drwxr-xr-x  3 root     root         4096  3월  6  2022 ../
-rw-------  1 minimonk minimonk      108 11월 27  2022 .Xauthority
-rw-------  1 minimonk minimonk     8430 11월 27  2022 .bash_history
-rw-r--r--  1 minimonk minimonk      220  3월  6  2022 .bash_logout
-rw-r--r--  1 minimonk minimonk     3771  3월  6  2022 .bashrc
drwx------ 14 minimonk minimonk     4096  3월  6  2022 .cache/
drwx------ 13 minimonk minimonk     4096  3월  6  2022 .config/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 .fontconfig/
drwx------  3 minimonk minimonk     4096  3월  6  2022 .gnupg/
-rw-------  1 minimonk minimonk       46  3월  7  2022 .lesshst
drwx------  3 minimonk minimonk     4096  3월  6  2022 .local/
-rw-r--r--  1 minimonk minimonk      807  3월  6  2022 .profile
drwx------  2 minimonk minimonk     4096  3월  6  2022 .ssh/
-rw-r--r--  1 minimonk minimonk        0  3월  6  2022 .sudo_as_admin_successful
-rw-------  1 minimonk minimonk      899 11월 27  2022 .viminfo
-rw-rw-r--  1 minimonk minimonk 64517549 11월 14 14:42 64bit-MSM_6.7_for_Ubuntu_Debian.tgz
-rwxrwxr-x  1 minimonk minimonk      184 11월 27  2022 mount.sh*
drwxrwxr-x  2 minimonk minimonk     4096  3월  7  2022 smb/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 공개/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 다운로드/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 문서/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 바탕화면/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 비디오/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 사진/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 음악/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 템플릿/
minimonk@ministor:~$ tar -xvf 64bit-MSM_6.7_for_Ubuntu_Debian.tgz 
lib-utils2_1.00-07_all.deb
megaraid-storage-manager_15.03.01-00_all.deb
install_msm_quiet.sh
install_msm.sh
msm_start.sh
purge_msm_quiet.sh
purge_msm.sh
Readme.txt
minimonk@ministor:~$ ll
합계 126540
drwxr-xr-x 17 minimonk minimonk     4096 11월 14 14:43 ./
drwxr-xr-x  3 root     root         4096  3월  6  2022 ../
-rw-------  1 minimonk minimonk      108 11월 27  2022 .Xauthority
-rw-------  1 minimonk minimonk     8430 11월 27  2022 .bash_history
-rw-r--r--  1 minimonk minimonk      220  3월  6  2022 .bash_logout
-rw-r--r--  1 minimonk minimonk     3771  3월  6  2022 .bashrc
drwx------ 14 minimonk minimonk     4096  3월  6  2022 .cache/
drwx------ 13 minimonk minimonk     4096  3월  6  2022 .config/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 .fontconfig/
drwx------  3 minimonk minimonk     4096  3월  6  2022 .gnupg/
-rw-------  1 minimonk minimonk       46  3월  7  2022 .lesshst
drwx------  3 minimonk minimonk     4096  3월  6  2022 .local/
-rw-r--r--  1 minimonk minimonk      807  3월  6  2022 .profile
drwx------  2 minimonk minimonk     4096  3월  6  2022 .ssh/
-rw-r--r--  1 minimonk minimonk        0  3월  6  2022 .sudo_as_admin_successful
-rw-------  1 minimonk minimonk      899 11월 27  2022 .viminfo
-rw-rw-r--  1 minimonk minimonk 64517549 11월 14 14:42 64bit-MSM_6.7_for_Ubuntu_Debian.tgz
-rw-r--r--  1 minimonk minimonk      940  4월 30  2015 Readme.txt
-rwxr-xr-x  1 minimonk minimonk      364  4월 28  2015 install_msm.sh*
-rwxr-xr-x  1 minimonk minimonk      411  4월 28  2015 install_msm_quiet.sh*
-rw-r--r--  1 minimonk minimonk  1233438  4월 28  2015 lib-utils2_1.00-07_all.deb
-rw-r--r--  1 minimonk minimonk 63683130  4월 28  2015 megaraid-storage-manager_15.03.01-00_all.deb
-rwxrwxr-x  1 minimonk minimonk      184 11월 27  2022 mount.sh*
-rwxr-xr-x  1 minimonk minimonk       64  4월 28  2015 msm_start.sh*
-rwxr-xr-x  1 minimonk minimonk      345  4월 25  2015 purge_msm.sh*
-rwxr-xr-x  1 minimonk minimonk      393  4월 25  2015 purge_msm_quiet.sh*
drwxrwxr-x  2 minimonk minimonk     4096  3월  7  2022 smb/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 공개/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 다운로드/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 문서/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 바탕화면/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 비디오/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 사진/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 음악/
drwxr-xr-x  2 minimonk minimonk     4096  3월  6  2022 템플릿/
minimonk@ministor:~$ ./install_msm.sh 
+ dpkg -i lib-utils2_1.00-07_all.deb
dpkg: 오류: 요청한 작업을 하려면 수퍼유저 권한이 필요합니다
+ dpkg -i megaraid-storage-manager_15.03.01-00_all.deb
dpkg: 오류: 요청한 작업을 하려면 수퍼유저 권한이 필요합니다
+ sleep 10
^C
minimonk@ministor:~$ sudo ./install_msm.sh 
[sudo] minimonk의 암호: 
+ dpkg -i lib-utils2_1.00-07_all.deb
Selecting previously unselected package lib-utils2.
(데이터베이스 읽는중 ...현재 176968개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack lib-utils2_1.00-07_all.deb ...
Installing....
Unpacking lib-utils2 (1.00-07) ...
lib-utils2 (1.00-07) 설정하는 중입니다 ...
+ dpkg -i megaraid-storage-manager_15.03.01-00_all.deb
Selecting previously unselected package megaraid-storage-manager.
(데이터베이스 읽는중 ...현재 176983개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack megaraid-storage-manager_15.03.01-00_all.deb ...
Installing....
Unpacking megaraid-storage-manager (15.03.01-00) ...
megaraid-storage-manager (15.03.01-00) 설정하는 중입니다 ...
/
/
/
/etc/X11/xinit/xinitrc.d
Processing triggers for systemd (245.4-4ubuntu3.15) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
+ sleep 10
+ ps -ea
+ grep -i java
+ killall java
java: no process found
+ ps -ea
+ grep -i java
+ /etc/init.d/vivaldiframeworkd stop
Framework is already stopped.....
+ sleep 5

+ /etc/init.d/vivaldiframeworkd start
Starting Framework: 
+ sleep 10

+ update-rc.d vivaldiframeworkd defaults
+ cd /usr/local/MegaRAID Storage Manager/
+ chmod 755 startupui.sh
+ ./startupui.sh
X11 Display variable is not properly set
minimonk@ministor:~$ 
minimonk@ministor:~$ 
minimonk@ministor:~$ Exception in thread "main" java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at sun.awt.HeadlessToolkit.getScreenSize(Unknown Source)
at GUI.VivaldiStartupDialog.main(Unknown Source)

minimonk@ministor:~$ 
minimonk@ministor:~$ 
minimonk@ministor:~$ java

명령어 'java' 을(를) 찾을 수 없습니다. 그러나 다음을 통해 설치할 수 있습니다:

sudo apt install openjdk-11-jre-headless  # version 11.0.14+9-0ubuntu2~20.04, or
sudo apt install default-jre              # version 2:1.11-72
sudo apt install openjdk-13-jre-headless  # version 13.0.7+5-0ubuntu1~20.04
sudo apt install openjdk-16-jre-headless  # version 16.0.1+9-1~20.04
sudo apt install openjdk-17-jre-headless  # version 17.0.2+8-1~20.04
sudo apt install openjdk-8-jre-headless   # version 8u312-b07-0ubuntu1~20.04

minimonk@ministor:~$ sudo apt install default-jre
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  libfprint-2-tod1 libllvm10
'sudo apt autoremove'를 이용하여 제거하십시오.
다음의 추가 패키지가 설치될 것입니다 :
  ca-certificates-java default-jre-headless fonts-dejavu-extra java-common
  libatk-wrapper-java libatk-wrapper-java-jni openjdk-11-jre
  openjdk-11-jre-headless
제안하는 패키지:
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei
  | fonts-wqy-zenhei
다음 새 패키지를 설치할 것입니다:
  ca-certificates-java default-jre default-jre-headless fonts-dejavu-extra
  java-common libatk-wrapper-java libatk-wrapper-java-jni openjdk-11-jre
  openjdk-11-jre-headless
0개 업그레이드, 9개 새로 설치, 0개 제거 및 2개 업그레이드 안 함.
39.5 M바이트 아카이브를 받아야 합니다.
이 작업 후 179 M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] 
받기:1 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 java-common all 0.72 [6,816 B]
무시:2 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre-headless amd64 11.0.14+9-0ubuntu2~20.04
받기:3 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 default-jre-headless amd64 2:1.11-72 [3,192 B]
받기:4 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 ca-certificates-java all 20190405ubuntu1 [12.2 kB]
무시:5 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre amd64 11.0.14+9-0ubuntu2~20.04
받기:6 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 default-jre amd64 2:1.11-72 [1,084 B]
받기:7 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 fonts-dejavu-extra all 2.37-1 [1,953 kB]
오류:2 http://security.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre-headless amd64 11.0.14+9-0ubuntu2~20.04
  404  Not Found [IP: 91.189.91.83 80]
오류:5 http://security.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre amd64 11.0.14+9-0ubuntu2~20.04
  404  Not Found [IP: 91.189.91.83 80]
받기:8 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 libatk-wrapper-java all 0.37.1-1 [53.0 kB]
받기:9 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 libatk-wrapper-java-jni amd64 0.37.1-1 [45.1 kB]
내려받기 2,074 k바이트, 소요시간 3초 (690 k바이트/초)
E: http://security.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jre-headless_11.0.14+9-0ubuntu2~20.04_amd64.deb 파일을 받는데 실패했습니다  404  Not Found [IP: 91.189.91.83 80]
E: http://security.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jre_11.0.14+9-0ubuntu2~20.04_amd64.deb 파일을 받는데 실패했습니다  404  Not Found [IP: 91.189.91.83 80]
E: 아카이브를 받을 수 없습니다. 아마도 apt-get update를 실행해야 하거나 --fix-missing 옵션을 줘서 실행해야 할 것입니다.
minimonk@ministor:~$ sudo apt-get updat --fix-missing
E: 잘못된 작업 updat
minimonk@ministor:~$ sudo apt-get update --fix-missing
기존:1 http://kr.archive.ubuntu.com/ubuntu focal InRelease                    
받기:2 http://kr.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]   
받기:3 http://kr.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB] 
받기:4 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,959 kB]
받기:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]    
받기:6 http://kr.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [906 kB]
받기:7 http://kr.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [481 kB]
받기:8 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [275 kB]
받기:9 http://kr.archive.ubuntu.com/ubuntu focal-updates/main DEP-11 48x48 Icons [60.8 kB]
받기:10 http://kr.archive.ubuntu.com/ubuntu focal-updates/main DEP-11 64x64 Icons [98.3 kB]
받기:11 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [17.2 kB]
받기:12 http://kr.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [2,479 kB]
받기:13 http://kr.archive.ubuntu.com/ubuntu focal-updates/restricted i386 Packages [36.0 kB]
받기:14 http://kr.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [346 kB]
받기:15 http://kr.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [552 B]
받기:16 http://kr.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,129 kB]
받기:17 http://kr.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [754 kB]
받기:18 http://kr.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [270 kB]
받기:19 http://kr.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [414 kB]
받기:20 http://kr.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 48x48 Icons [287 kB]
받기:21 http://kr.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 64x64 Icons [503 kB]
받기:22 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2,569 kB]
받기:23 http://kr.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [25.7 kB]
받기:24 http://kr.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [25.8 kB]
받기:25 http://kr.archive.ubuntu.com/ubuntu focal-updates/multiverse i386 Packages [8,440 B]
받기:26 http://kr.archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [7,484 B]
받기:27 http://kr.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]
받기:28 http://kr.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [620 B]
받기:29 http://kr.archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [45.7 kB]
받기:30 http://kr.archive.ubuntu.com/ubuntu focal-backports/main i386 Packages [36.1 kB]
받기:31 http://kr.archive.ubuntu.com/ubuntu focal-backports/main Translation-en [16.3 kB]
받기:32 http://kr.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [7,968 B]
받기:33 http://kr.archive.ubuntu.com/ubuntu focal-backports/main DEP-11 48x48 Icons [7,156 B]
받기:34 http://kr.archive.ubuntu.com/ubuntu focal-backports/main DEP-11 64x64 Icons [10.7 kB]
받기:35 http://kr.archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [1,420 B]
받기:36 http://kr.archive.ubuntu.com/ubuntu focal-backports/universe i386 Packages [13.8 kB]
받기:37 http://kr.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [25.0 kB]
받기:38 http://kr.archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [16.3 kB]
받기:39 http://kr.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.5 kB]
받기:40 http://kr.archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 48x48 Icons [13.3 kB]
받기:41 http://kr.archive.ubuntu.com/ubuntu focal-backports/universe DEP-11 64x64 Icons [22.7 kB]
받기:42 http://kr.archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [880 B]
받기:43 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [672 kB]
받기:44 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [398 kB]
받기:45 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59.9 kB]
받기:46 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 48x48 Icons [18.9 kB]
받기:47 http://security.ubuntu.com/ubuntu focal-security/main DEP-11 64x64 Icons [36.0 kB]
받기:48 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [13.2 kB]
받기:49 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [2,367 kB]
받기:50 http://security.ubuntu.com/ubuntu focal-security/restricted i386 Packages [34.7 kB]
받기:51 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [329 kB]
받기:52 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [552 B]
받기:53 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [898 kB]
받기:54 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [621 kB]
받기:55 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [188 kB]
받기:56 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [96.6 kB]
받기:57 http://security.ubuntu.com/ubuntu focal-security/universe DEP-11 48x48 Icons [55.5 kB]
받기:58 http://security.ubuntu.com/ubuntu focal-security/universe DEP-11 64x64 Icons [106 kB]
받기:59 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [19.2 kB]
받기:60 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [23.6 kB]
받기:61 http://security.ubuntu.com/ubuntu focal-security/multiverse i386 Packages [7,188 B]
받기:62 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [5,504 B]
받기:63 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [940 B]
받기:64 http://security.ubuntu.com/ubuntu focal-security/multiverse DEP-11 48x48 Icons [1,867 B]
받기:65 http://security.ubuntu.com/ubuntu focal-security/multiverse DEP-11 64x64 Icons [2,497 B]
받기:66 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [548 B]
내려받기 20.2 M바이트, 소요시간 7초 (2,763 k바이트/초)                         
패키지 목록을 읽는 중입니다... 완료
minimonk@ministor:~$ sudo apt install default-jre
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  libfprint-2-tod1 libllvm10
'sudo apt autoremove'를 이용하여 제거하십시오.
다음의 추가 패키지가 설치될 것입니다 :
  ca-certificates-java default-jre-headless fonts-dejavu-extra java-common
  libatk-wrapper-java libatk-wrapper-java-jni openjdk-11-jre
  openjdk-11-jre-headless
제안하는 패키지:
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei
  | fonts-wqy-zenhei
다음 새 패키지를 설치할 것입니다:
  ca-certificates-java default-jre default-jre-headless fonts-dejavu-extra
  java-common libatk-wrapper-java libatk-wrapper-java-jni openjdk-11-jre
  openjdk-11-jre-headless
0개 업그레이드, 9개 새로 설치, 0개 제거 및 452개 업그레이드 안 함.
38.4 M바이트/40.5 M바이트 아카이브를 받아야 합니다.
이 작업 후 184 M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] 
받기:1 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre-headless amd64 11.0.20.1+1-0ubuntu1~20.04 [38.2 MB]
받기:2 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 ca-certificates-java all 20190405ubuntu1.1 [12.4 kB]
받기:3 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre amd64 11.0.20.1+1-0ubuntu1~20.04 [193 kB]
내려받기 38.4 M바이트, 소요시간 12초 (3,276 k바이트/초)                        
Selecting previously unselected package java-common.
(데이터베이스 읽는중 ...현재 181405개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../0-java-common_0.72_all.deb ...
Unpacking java-common (0.72) ...
Selecting previously unselected package openjdk-11-jre-headless:amd64.
Preparing to unpack .../1-openjdk-11-jre-headless_11.0.20.1+1-0ubuntu1~20.04_amd
64.deb ...
Unpacking openjdk-11-jre-headless:amd64 (11.0.20.1+1-0ubuntu1~20.04) ...
Selecting previously unselected package default-jre-headless.
Preparing to unpack .../2-default-jre-headless_2%3a1.11-72_amd64.deb ...
Unpacking default-jre-headless (2:1.11-72) ...
Selecting previously unselected package ca-certificates-java.
Preparing to unpack .../3-ca-certificates-java_20190405ubuntu1.1_all.deb ...
Unpacking ca-certificates-java (20190405ubuntu1.1) ...
Selecting previously unselected package openjdk-11-jre:amd64.
Preparing to unpack .../4-openjdk-11-jre_11.0.20.1+1-0ubuntu1~20.04_amd64.deb ..
.
Unpacking openjdk-11-jre:amd64 (11.0.20.1+1-0ubuntu1~20.04) ...
Selecting previously unselected package default-jre.
Preparing to unpack .../5-default-jre_2%3a1.11-72_amd64.deb ...
Unpacking default-jre (2:1.11-72) ...
Selecting previously unselected package fonts-dejavu-extra.
Preparing to unpack .../6-fonts-dejavu-extra_2.37-1_all.deb ...
Unpacking fonts-dejavu-extra (2.37-1) ...
Selecting previously unselected package libatk-wrapper-java.
Preparing to unpack .../7-libatk-wrapper-java_0.37.1-1_all.deb ...
Unpacking libatk-wrapper-java (0.37.1-1) ...
Selecting previously unselected package libatk-wrapper-java-jni:amd64.
Preparing to unpack .../8-libatk-wrapper-java-jni_0.37.1-1_amd64.deb ...
Unpacking libatk-wrapper-java-jni:amd64 (0.37.1-1) ...
java-common (0.72) 설정하는 중입니다 ...
fonts-dejavu-extra (2.37-1) 설정하는 중입니다 ...
libatk-wrapper-java (0.37.1-1) 설정하는 중입니다 ...
libatk-wrapper-java-jni:amd64 (0.37.1-1) 설정하는 중입니다 ...
default-jre-headless (2:1.11-72) 설정하는 중입니다 ...
openjdk-11-jre-headless:amd64 (11.0.20.1+1-0ubuntu1~20.04) 설정하는 중입니다 ...
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/java to provid
e /usr/bin/java (java) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/jjs to provide
 /usr/bin/jjs (jjs) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/keytool to pro
vide /usr/bin/keytool (keytool) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/rmid to provid
e /usr/bin/rmid (rmid) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/rmiregistry to
 provide /usr/bin/rmiregistry (rmiregistry) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/pack200 to pro
vide /usr/bin/pack200 (pack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/unpack200 to p
rovide /usr/bin/unpack200 (unpack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/lib/jexec to provi
de /usr/bin/jexec (jexec) in auto mode
openjdk-11-jre:amd64 (11.0.20.1+1-0ubuntu1~20.04) 설정하는 중입니다 ...
default-jre (2:1.11-72) 설정하는 중입니다 ...
ca-certificates-java (20190405ubuntu1.1) 설정하는 중입니다 ...
head: 읽기를 위해 '/etc/ssl/certs/java/cacerts'을(를) 열 수 없음: 그런 파일이나 
디렉터리가 없습니다
Adding debian:Entrust.net_Premium_2048_Secure_Server_CA.pem
Adding debian:SSL.com_Root_Certification_Authority_ECC.pem
Adding debian:IdenTrust_Commercial_Root_CA_1.pem
Adding debian:QuoVadis_Root_CA_1_G3.pem
Adding debian:emSign_ECC_Root_CA_-_G3.pem
Adding debian:GeoTrust_Primary_Certification_Authority_-_G2.pem
Adding debian:TrustCor_RootCert_CA-1.pem
Adding debian:XRamp_Global_CA_Root.pem
Adding debian:DigiCert_Global_Root_G2.pem
Adding debian:Global_Chambersign_Root_-_2008.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R5.pem
Adding debian:Cybertrust_Global_Root.pem
Adding debian:ISRG_Root_X1.pem
Adding debian:Microsoft_ECC_Root_Certificate_Authority_2017.pem
Adding debian:Actalis_Authentication_Root_CA.pem
Adding debian:Comodo_AAA_Services_root.pem
Adding debian:Hongkong_Post_Root_CA_1.pem
Adding debian:CFCA_EV_ROOT.pem
Adding debian:AffirmTrust_Commercial.pem
Adding debian:DigiCert_Global_Root_CA.pem
Adding debian:GTS_Root_R1.pem
Adding debian:IdenTrust_Public_Sector_Root_CA_1.pem
Adding debian:DigiCert_Global_Root_G3.pem
Adding debian:Starfield_Services_Root_Certificate_Authority_-_G2.pem
Adding debian:Atos_TrustedRoot_2011.pem
Adding debian:Microsoft_RSA_Root_Certificate_Authority_2017.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2015.pem
Adding debian:AffirmTrust_Premium.pem
Adding debian:Hongkong_Post_Root_CA_3.pem
Adding debian:DigiCert_Trusted_Root_G4.pem
Adding debian:Certum_Trusted_Network_CA_2.pem
Adding debian:COMODO_RSA_Certification_Authority.pem
Adding debian:Certigna_Root_CA.pem
Adding debian:DigiCert_High_Assurance_EV_Root_CA.pem
Adding debian:DigiCert_Assured_ID_Root_G2.pem
Adding debian:GDCA_TrustAUTH_R5_ROOT.pem
Adding debian:Trustwave_Global_ECC_P384_Certification_Authority.pem
Adding debian:Trustwave_Global_Certification_Authority.pem
Adding debian:SwissSign_Silver_CA_-_G2.pem
Adding debian:Amazon_Root_CA_3.pem
Adding debian:Amazon_Root_CA_2.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem
Adding debian:Microsec_e-Szigno_Root_CA_2009.pem
Adding debian:OISTE_WISeKey_Global_Root_GC_CA.pem
Adding debian:Go_Daddy_Root_Certificate_Authority_-_G2.pem
Adding debian:COMODO_ECC_Certification_Authority.pem
Adding debian:QuoVadis_Root_CA.pem
Adding debian:Staat_der_Nederlanden_Root_CA_-_G3.pem
Adding debian:Security_Communication_RootCA2.pem
Adding debian:Certigna.pem
Adding debian:Trustwave_Global_ECC_P256_Certification_Authority.pem
Adding debian:certSIGN_ROOT_CA.pem
Adding debian:QuoVadis_Root_CA_2_G3.pem
Adding debian:CA_Disig_Root_R2.pem
Adding debian:T-TeleSec_GlobalRoot_Class_2.pem
Adding debian:Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem
Adding debian:USERTrust_ECC_Certification_Authority.pem
Adding debian:Buypass_Class_2_Root_CA.pem
Adding debian:Entrust_Root_Certification_Authority_-_G2.pem
Adding debian:VeriSign_Universal_Root_Certification_Authority.pem
Adding debian:QuoVadis_Root_CA_2.pem
Adding debian:TeliaSonera_Root_CA_v1.pem
Adding debian:EC-ACC.pem
Adding debian:GlobalSign_Root_CA_-_R6.pem
Adding debian:Starfield_Class_2_CA.pem
Adding debian:TWCA_Global_Root_CA.pem
Adding debian:GTS_Root_R2.pem
Adding debian:Staat_der_Nederlanden_EV_Root_CA.pem
Adding debian:AffirmTrust_Premium_ECC.pem
Adding debian:Network_Solutions_Certificate_Authority.pem
Adding debian:QuoVadis_Root_CA_3.pem
Adding debian:ePKI_Root_Certification_Authority.pem
Adding debian:Entrust_Root_Certification_Authority_-_G4.pem
Adding debian:AffirmTrust_Networking.pem
Adding debian:COMODO_Certification_Authority.pem
Adding debian:UCA_Extended_Validation_Root.pem
Adding debian:SecureSign_RootCA11.pem
Adding debian:Entrust_Root_Certification_Authority.pem
Adding debian:emSign_Root_CA_-_G1.pem
Adding debian:SZAFIR_ROOT_CA2.pem
Adding debian:TWCA_Root_Certification_Authority.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R4.pem
Adding debian:UCA_Global_G2_Root.pem
Adding debian:GTS_Root_R3.pem
Adding debian:AC_RAIZ_FNMT-RCM.pem
Adding debian:Certum_Trusted_Network_CA.pem
Adding debian:SSL.com_EV_Root_Certification_Authority_ECC.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_2009.pem
Adding debian:E-Tugra_Certification_Authority.pem
Adding debian:Chambers_of_Commerce_Root_-_2008.pem
Adding debian:TrustCor_RootCert_CA-2.pem
Adding debian:SSL.com_EV_Root_Certification_Authority_RSA_R2.pem
Adding debian:SecureTrust_CA.pem
Adding debian:TUBITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem
Adding debian:Buypass_Class_3_Root_CA.pem
Adding debian:e-Szigno_Root_CA_2017.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_EV_2009.pem
Adding debian:ACCVRAIZ1.pem
Adding debian:Secure_Global_CA.pem
Adding debian:Amazon_Root_CA_4.pem
Adding debian:GTS_Root_R4.pem
Adding debian:certSIGN_Root_CA_G2.pem
Adding debian:Amazon_Root_CA_1.pem
Adding debian:Sonera_Class_2_Root_CA.pem
Adding debian:emSign_Root_CA_-_C1.pem
Adding debian:ssl-cert-snakeoil.pem
Adding debian:GlobalSign_Root_CA.pem
Adding debian:DigiCert_Assured_ID_Root_CA.pem
Adding debian:Security_Communication_Root_CA.pem
Adding debian:Entrust_Root_Certification_Authority_-_EC1.pem
Adding debian:Go_Daddy_Class_2_CA.pem
Adding debian:Trustis_FPS_Root_CA.pem
Adding debian:Baltimore_CyberTrust_Root.pem
Adding debian:NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem
Adding debian:TrustCor_ECA-1.pem
Adding debian:SwissSign_Gold_CA_-_G2.pem
Adding debian:QuoVadis_Root_CA_3_G3.pem
Adding debian:DigiCert_Assured_ID_Root_G3.pem
Adding debian:OISTE_WISeKey_Global_Root_GB_CA.pem
Adding debian:Starfield_Root_Certificate_Authority_-_G2.pem
Adding debian:emSign_ECC_Root_CA_-_C3.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_ECC_RootCA_2015.pem
Adding debian:GlobalSign_Root_CA_-_R2.pem
Adding debian:USERTrust_RSA_Certification_Authority.pem
Adding debian:GlobalSign_Root_CA_-_R3.pem
Adding debian:Izenpe.com.pem
Adding debian:NAVER_Global_Root_Certification_Authority.pem
Adding debian:SSL.com_Root_Certification_Authority_RSA.pem
Adding debian:T-TeleSec_GlobalRoot_Class_3.pem
done.
Processing triggers for fontconfig (2.13.1-2ubuntu3) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ca-certificates (20210119~20.04.2) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

done.
done.
minimonk@ministor:~$ 
minimonk@ministor:~$ 
minimonk@ministor:~$ sudo ./install_msm.sh 
+ dpkg -i lib-utils2_1.00-07_all.deb
(데이터베이스 읽는중 ...현재 181809개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack lib-utils2_1.00-07_all.deb ...
Installing....
Unpacking lib-utils2 (1.00-07) over (1.00-07) ...
lib-utils2 (1.00-07) 설정하는 중입니다 ...
+ dpkg -i megaraid-storage-manager_15.03.01-00_all.deb
(데이터베이스 읽는중 ...현재 181809개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack megaraid-storage-manager_15.03.01-00_all.deb ...
Framework running
Inside loadVivaldikeyProp 
localePath for res file::ko
frameworkWWN :192.168.219.199:3071:0
frameworkWWN :192.168.219.199:3071:0
System time before socket connection:Tue Nov 14 14:46:19 KST 2023
SSL_STRONG_ENCRYPTION  File Name is ::./StrongSSLEncryption.ini
iniFlag isDISABLE
frameworkWWN :192.168.219.199:3071:0
LOCAL Registered client :: 192.168.219.199:3071:0
LOCAL Registered client :: 127.0.0.1:0:1
frameworkWWN :192.168.219.199:3071:0
ActiveClientList created
No machines Found
/
/
Shutting down Framework: 
Installing....
Unpacking megaraid-storage-manager (15.03.01-00) over (15.03.01-00) ...
megaraid-storage-manager (15.03.01-00) 설정하는 중입니다 ...
/var/lib/dpkg/info/megaraid-storage-manager.postinst: 줄 20: /usr/local/MegaRAID Storage Manager/installtype: 그런 파일이나 디렉터리가 없습니다
/var/lib/dpkg/info/megaraid-storage-manager.postinst: 27 줄: cd: /usr/local/MegaRAID Storage Manager: 그런 파일이나 디렉터리가 없습니다
chmod: 'MegaPopup'에 접근할 수 없습니다: 그런 파일이나 디렉터리가 없습니다
/var/lib/dpkg/info/megaraid-storage-manager.postinst: 29 줄: cd: OLDPWD 설정되지 않음
/var/lib/dpkg/info/megaraid-storage-manager.postinst: 30 줄: cd: /usr/local/MegaRAID Storage Manager/MegaPopup: 그런 파일이나 디렉터리가 없습니다
/var/lib/dpkg/info/megaraid-storage-manager.postinst: 32 줄: cd: OLDPWD 설정되지 않음
/var/lib/dpkg/info/megaraid-storage-manager.postinst: 36 줄: cd: /usr/local/MegaRAID Storage Manager/MegaMonitor: 그런 파일이나 디렉터리가 없습니다
/var/lib/dpkg/info/megaraid-storage-manager.postinst: 38 줄: cd: OLDPWD 설정되지 않음
/var/lib/dpkg/info/megaraid-storage-manager.postinst: 줄 200: /usr/local/MegaRAID Storage Manager/pwd.sh: 그런 파일이나 디렉터리가 없습니다
chmod: '/etc/init.d/msm_profile'에 접근할 수 없습니다: 그런 파일이나 디렉터리가 없습니다
Processing triggers for systemd (245.4-4ubuntu3.15) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
+ sleep 10
+ ps -ea
+ grep -i java
   3339 pts/1    00:00:05 java
   3404 ?        00:00:00 java
   6809 pts/1    00:00:00 java
+ killall java
+ ps -ea
+ grep -i java
   3339 pts/1    00:00:05 java
   3404 ?        00:00:00 java <defunct>
   6809 pts/1    00:00:00 java
+ /etc/init.d/vivaldiframeworkd stop
Shutting down Framework: 
+ sleep 5
sh: 0: Can't open /Framework/shutdown.sh
+ /etc/init.d/vivaldiframeworkd start
Framework is already running.....
+ sleep 10
+ update-rc.d vivaldiframeworkd defaults
+ cd /usr/local/MegaRAID*/
./install_msm.sh: 15: cd: can't cd to /usr/local/MegaRAID*/
+ chmod 755 startupui.sh
chmod: 'startupui.sh'에 접근할 수 없습니다: 그런 파일이나 디렉터리가 없습니다
+ ./startupui.sh
./install_msm.sh: 17: ./startupui.sh: not found
minimonk@ministor:~$ ls -al
-bash: /usr/bin/ls: 허가 거부
minimonk@ministor:~$ pwd
/home/minimonk
minimonk@ministor:~$ sudo su -
-bash: /usr/bin/sudo: 허가 거부
minimonk@ministor:~$ 

'하드웨어 > RAID' 카테고리의 다른 글

MegaCLI  (0) 2024.04.01
MegaRAID Storage Manager(MSM) 설치완료  (0) 2024.04.01
msm - Megaraid Storage Management  (0) 2022.11.27
smartctl을 이용하여 개별하드 상태보기  (0) 2019.03.15
iscsi mdadm  (0) 2019.03.13
Posted by 구차니
Linux API/linux2023. 11. 13. 17:35

무지성으로 mmap이니 반대 짝이 먼지 찾아서 munmap 하고 쓰고 있었는데

mmap과 malloc의 차이 그리고 malloc이 어떻게 구현되어있는지 문득 궁금해졌다.

 

munmap 서브루틴은 맵핑된 파일이나 공유 메모리 영역 또는 익명 메모리 영역을 맵핑 해제합니다. munmap 서브루틴은 호출에서 작성된 영역을 mmap 서브루틴으로만 맵핑 해제합니다.

주소가 munmap 서브루틴에 의해 맵핑되지 않은 리젼에 있고 해당 리젼이 이후에 다시 맵핑되지 않는 경우, 해당 주소에 대한 모든 참조로 인해 프로세스에 SIGSEGV 신호가 전달됩니다.

[링크 : https://www.ibm.com/docs/ko/aix/7.3?topic=m-munmap-subroutine]

 

mmap()에서는 할당 메모리의 크기가 최소 4KB(mmap()은 페이지 크기의 배수로 할당).
malloc()은 큰 메모리 블록 요청이 들어오면 내부적으로 mmap()을 써서 메모리를 할당한다. 
mmap()이 malloc()을 포함하는 개념이라기보다 mmap()은 시스템에서 제공하는 저수준 시스템 콜이며 특별한 조건일 때 메모리를 할당하는 효과를 볼 수 있다. malloc()은 메모리를 할당하는 C library 함수이며 내부적으로 mmap(), brk() 등 시스템 콜을 써서 구현.

[링크 : https://woonys.tistory.com/entry/정글사관학교-51일차-TIL-mmap과-malloc-차이-정리]

[링크 : https://mintnlatte.tistory.com/357]

 

직접 mmap()을 쓸 경우, valgrind/efence/duma 등 메모리 디버깅 툴의 도움을 받을 수도 없습니다.

[링크 : https://kldp.org/node/101737]

 

malloc.c 에서 함수를 찾는데 mmap을 먼저 찾고 역으로 올라가면서 찾아보는 중

static void *
sysmalloc (INTERNAL_SIZE_T nb, mstate av)
{
      if ((unsigned long) (size) > (unsigned long) (nb))
        {
          mm = (char *) (MMAP (0, size, PROT_READ | PROT_WRITE, 0));
        }
}


static void *
_int_malloc (mstate av, size_t bytes)
{
  if (__glibc_unlikely (av == NULL))
    {
      void *p = sysmalloc (nb, av);
      if (p != NULL)
alloc_perturb (p, bytes);
      return p;
    }
}


void *
__libc_malloc (size_t bytes)
{
  if (SINGLE_THREAD_P)
    {
      victim = _int_malloc (&main_arena, bytes);
      assert (!victim || chunk_is_mmapped (mem2chunk (victim)) ||
      &main_arena == arena_for_chunk (mem2chunk (victim)));
      return victim;
    }

  arena_get (ar_ptr, bytes);

  victim = _int_malloc (ar_ptr, bytes);
}

[링크 : https://elixir.bootlin.com/glibc/glibc-2.26/source/malloc/malloc.c]

 

위의 함수들에 대한 자세한 설명은 아래 참조

[링크 : https://m.blog.naver.com/yjw_sz/221549666704]

'Linux API > linux' 카테고리의 다른 글

리눅스 커널 6.6.6 릴리즈  (0) 2023.12.13
mmap() 과 munmap() 예제  (0) 2023.11.17
/proc/uptime  (0) 2023.10.24
/proc/pid/statm  (0) 2023.10.23
malloc() 으로 할당된 메모리 리스트?  (0) 2023.10.19
Posted by 구차니
개소리 왈왈/컴퓨터2023. 11. 12. 23:35

hdd 케이지는 강성 부족으로 케이스가 덜덜덜..

역시 hdd는 케이스가 무거워야 겠구먼..

어찌어찌 서버도 1tb 8개는 될 것 같으니

raid나 구성하고 박살내봐야겠다

Posted by 구차니

딸래미 생일이라 가족들과 외식하고

집에왔다 오랫만에 스타필드 가서는 왕창 쓰고 옴

그 와중에 중앙 통로... 티니핑.. 으아아아아 위험해!

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

체외충격파는 아직 무서워  (0) 2023.11.15
내일은 수능날  (0) 2023.11.14
어깨 떄문에 뒷목이 아프다 ㅠㅠ  (0) 2023.10.28
통깁스  (0) 2023.10.26
으아아아앙  (0) 2023.10.23
Posted by 구차니
Programming/golang2023. 11. 10. 14:30

아놔.. 너무 심하게 강형 언어인거 아닌가 싶을 정도로

별별것 다 트집을 잡아서 명시적으로 형변환을 하게 만든다

time.Sleep(2 * time.Second) // 정상 작동

var update_sec int = 2
time.Sleep(update_sec * time.Second) // 에러

time.Sleep(time.Duration(update_sec) * time.Second) // 정상 작동

[링크 : https://jusths.tistory.com/71]

 

아니면 내가 너무 golang을 golang 답게 안쓰는건가?

'Programming > golang' 카테고리의 다른 글

golang용 swagger  (0) 2024.01.17
golang echo static web / logo.* 안돼?  (0) 2023.12.08
golang 타입 캐스팅 제약(?)  (0) 2023.11.09
golang 배열과 슬라이스  (0) 2023.11.08
golang ini 지원  (0) 2023.11.07
Posted by 구차니
Programming/golang2023. 11. 9. 10:58

눈에도 안들어 온다 으아아

[링크 : https://stackoverflow.com/questions/28040896/why-can-not-convert-sizebyte-to-string-in-go]

 

슬라이스를 배열로 하려면 copy 해야 하는 듯

package main
import "fmt"

//create main function to execute the program
func main() {
   var slice []int // initialize slice
   slice = append(slice, 10) //fill the slice using append function
   slice = append(slice, 20)
   slice = append(slice, 30)
   
   // Convert the slice to an array
   array := [3]int{} //initialized an empty array
   copy(array[:], slice) //copy the elements of slice in newly created array
   fmt.Println("The slice is converted into array and printed as:")
   fmt.Println(array) // prints the output: [10 20 30]
}

[링크 : https://www.tutorialspoint.com/golang-program-to-convert-slice-into-array]

'Programming > golang' 카테고리의 다른 글

golang echo static web / logo.* 안돼?  (0) 2023.12.08
golang 타입 땜시 짜증  (0) 2023.11.10
golang 배열과 슬라이스  (0) 2023.11.08
golang ini 지원  (0) 2023.11.07
golang 함수인자에 배열 포인터  (0) 2023.11.07
Posted by 구차니
개소리 왈왈/컴퓨터2023. 11. 8. 22:47

키보드는 ctrl 왼쪽이 잘 안눌려서

묘하게 복사 붙여 넣기가 한번에 안되고

 

마우스는 미묘~~하게 좌클릭이 안된다

다이소 가서 사야하나..

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

오늘의 당근은 실패  (0) 2023.11.23
mitx 환상 와장창  (0) 2023.11.12
synology 213j 7.x 업데이트  (0) 2023.11.06
몇일 늦은 사진 없는 개봉기 - 조이트론 웹캠  (0) 2023.10.31
mitx 한대 줍줍  (0) 2023.10.30
Posted by 구차니
Programming/golang2023. 11. 8. 22:34

다시 a tour of go 봐야 할 듯..

 

Arrays
The type [n]T is an array of n values of type T.

The expression

var a [10]int
declares a variable a as an array of ten integers.

An array's length is part of its type, so arrays cannot be resized. This seems limiting, but don't worry; Go provides a convenient way of working with arrays.

[링크 : https://go.dev/tour/moretypes/6]

 

 

Slices
An array has a fixed size. A slice, on the other hand, is a dynamically-sized, flexible view into the elements of an array. In practice, slices are much more common than arrays.

The type []T is a slice with elements of type T.

A slice is formed by specifying two indices, a low and high bound, separated by a colon:

a[low : high]
This selects a half-open range which includes the first element, but excludes the last one.

The following expression creates a slice which includes elements 1 through 3 of a:

a[1:4]

[링크 : https://go.dev/tour/moretypes/7]

 

 

크기가 정해지면 array, 정해지지않으면 slice인가?

Since you didn't specify the length, it is a slice.
An array type definition specifies a length and an element type: see "Go Slices: usage and internals"

[링크 : https://stackoverflow.com/questions/29361377/creating-a-go-slice-without-make]

 

 

갑자기 length와 capacity?!

A slice literal is declared just like an array literal, except you leave out the element count:

letters := []string{"a", "b", "c", "d"}

slice can be created with the built-in function called make, which has the signature,

func make([]T, len, cap) []T

where T stands for the element type of the slice to be created. The make function takes a type, a length, and an optional capacity. When called, make allocates an array and returns a slice that refers to that array.

var s []byte
s = make([]byte, 5, 5)
// s == []byte{0, 0, 0, 0, 0}

When the capacity argument is omitted, it defaults to the specified length. Here’s a more succinct version of the same code:

s := make([]byte, 5)

The length and capacity of a slice can be inspected using the built-in len and cap functions.

len(s) == 5
cap(s) == 5

[링크 : https://go.dev/blog/slices-intro]

 

 

실제 사용시에 capacity까지 알 필요는 없을려나?

capacity: 실제 메모리에 할당된 공간입니다. 만약 슬라이스에 요소를 추가하여 capacity가 가득차면 자동으로 늘어납니다.

[링크 : https://www.pymoon.com/entry/Go-튜토리얼-배열-슬라이스]

[링크 : https://phsun102.tistory.com/82]

[링크 : https://go.dev/tour/moretypes/11]

 

 

2차원 배열은 [][]type 으로 생성하면되는데

make를 통해서도 2차원 배열이 생성가능한진 모르겠다

package main

import "fmt"

func main() {
    // Step 1: create empty collection.
    values := [][]int{}

    // Step 2: these are the first two rows.
    // ... Append each row to the two-dimensional slice.
    row1 := []int{1, 2, 3}
    row2 := []int{4, 5, 6}
    values = append(values, row1)
    values = append(values, row2)

    // Step 3: display first row, and second row.
    fmt.Println("Row 1")
    fmt.Println(values[0])
    fmt.Println("Row 2")
    fmt.Println(values[1])

    // Step 4: access an element.
    fmt.Println("First element")
    fmt.Println(values[0][0])
}
Row 1
[1 2 3]
Row 2
[4 5 6]
First element
1

[링크 : https://www.dotnetperls.com/2d-go]

 

 

 

make와 := []type 두개가 동등하다면 가능할지도?

package main

import (
"fmt"
"strings"
)

func main() {
// Create a tic-tac-toe board.
board := [][]string{
[]string{"_", "_", "_"},
[]string{"_", "_", "_"},
[]string{"_", "_", "_"},
}

// The players take turns.
board[0][0] = "X"
board[0][2] = "X"
board[1][0] = "O"
board[1][2] = "X"
board[2][2] = "O"


for i := 0; i < len(board); i++ {
fmt.Printf("%s\n", strings.Join(board[i], " "))
}
}
X _ X
O _ X
_ _ O

[링크 : https://go.dev/tour/moretypes/14]

'Programming > golang' 카테고리의 다른 글

golang 타입 땜시 짜증  (0) 2023.11.10
golang 타입 캐스팅 제약(?)  (0) 2023.11.09
golang ini 지원  (0) 2023.11.07
golang 함수인자에 배열 포인터  (0) 2023.11.07
c to golang online converter  (0) 2023.11.07
Posted by 구차니