前提・実現したいこと
rasberry pi 3にVisual Studio Codeを入れようと思ったのですが
どうすれば良いでしょうか?
OS・ubuntu MATE 16.04
発生している問題・エラーメッセージ
エラーが出た(Raspbianでも)
bash
1. 2. 3. 4gpg: no valid OpenPGP data found. 5. 6. 7(ubuntu MATE) 8E: ロック /var/lib/dpkg/lock が取得できませんでした - open (11: Resource temporarily unavailable) 9E: 管理用ディレクトリ (/var/lib/dpkg/) をロックできません。これを使う別のプロセスが動いていませんか?
該当のソースコード
bash
1kawasaki@kawasaki-desktop:~$ sudo -s 2[sudo] password for kawasaki: 3root@kawasaki-desktop:~# wget https://packagecloud.io/headmelted/codebuilds/gpgkey -O - | sudo apt-key add - 4--2019-03-09 14:09:45-- https://packagecloud.io/headmelted/codebuilds/gpgkey 5Resolving packagecloud.io (packagecloud.io)... 2600:1f1c:2e5:6900:9a4c:c144:af39:25f, 2600:1f1c:2e5:6901:a4e4:ba90:f067:12c6, 54.241.144.200, ... 6Connecting to packagecloud.io (packagecloud.io)|2600:1f1c:2e5:6900:9a4c:c144:af39:25f|:443... connected. 7HTTP request sent, awaiting response... 302 Found 8Location: https://d28dx6y1hfq314.cloudfront.net/3487/3704/gpg/headmelted-code-oss-0CC3FD642696BFC8.pub.gpg?t=1552108491_e2eb4e8d4144d154ef62ca5ad490490454d32140 [following] 9--2019-03-09 14:09:51-- https://d28dx6y1hfq314.cloudfront.net/3487/3704/gpg/headmelted-code-oss-0CC3FD642696BFC8.pub.gpg?t=1552108491_e2eb4e8d4144d154ef62ca5ad490490454d32140 10Resolving d28dx6y1hfq314.cloudfront.net (d28dx6y1hfq314.cloudfront.net)... 2600:9000:202b:dc00:1a:455d:3600:21, 2600:9000:202b:2400:1a:455d:3600:21, 2600:9000:202b:e800:1a:455d:3600:21, ... 11Connecting to d28dx6y1hfq314.cloudfront.net (d28dx6y1hfq314.cloudfront.net)|2600:9000:202b:dc00:1a:455d:3600:21|:443... connected. 12HTTP request sent, awaiting response... 200 OK 13Length: 3949 (3.9K) [text/plain] 14Saving to: ‘STDOUT’ 15 16- 100%[===================>] 3.86K --.-KB/s in 0.002s 17 182019-03-09 14:09:51 (2.10 MB/s) - written to stdout [3949/3949] 19 20OK 21root@kawasaki-desktop:~# curl -L https://code.headmelted.com/installers/apt.sh | sudo bash 22 23
If you get an error message like 'gpg: command not found', then you have to install the gnupg package. But Im afraid another problem might occurred, according to https://pimylifeup.com/raspberry-pi-visual-studio-code/ . Hope this help.
help
I can only point it out that apt.sh, that you have downloaded, has a bug about executing curl command. The line 28 has curl command to execute, but it should be like 'curl -L' (with -L option). A simple workaround may be as follows: (i) wget https://code.headmelted.com/installers/apt.sh to download this shell script, (ii) Edit the apt.sh ('curl $gpg_key...' to 'curl -L $gpg_key...'; add -L option), (iii) Type 'bash ./apt.sh' . I am not sure this works for you.
回答2件
あなたの回答
tips
プレビュー