質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
Bash on Ubuntu on Windows

Bash on Ubuntu on Windowsは、Windows Subsystem for Linux(WSL)の非推奨の名称。Windows10およびWindows Server上でLinuxのバイナリ実行ファイルをネイティブ実行するための互換レイヤーです。

Q&A

解決済

1回答

5114閲覧

Ubuntu 20.04でパッケージ(libxml2-devel libcurl-devel libopenssl-devel openssl-devel)をインストールできない

i113

総合スコア74

Bash on Ubuntu on Windows

Bash on Ubuntu on Windowsは、Windows Subsystem for Linux(WSL)の非推奨の名称。Windows10およびWindows Server上でLinuxのバイナリ実行ファイルをネイティブ実行するための互換レイヤーです。

0グッド

0クリップ

投稿2020/12/18 02:26

【やりたいこと】
Windows10のWSL2で導入したUbuntu20.04に目的のパッケージ(libxml2-devel libcurl-devel libopenssl-devel openssl-devel)をインストールしたい。

【問題点】
以下のように、apt-getでインストールを試みたのですが失敗しました。

ubuntu

1ub@win:~$ sudo apt-get install libxml2-devel libcurl-devel libopenssl-devel openssl-devel 2Reading package lists... Done 3Building dependency tree 4Reading state information... Done 5E: Unable to locate package libxml2-devel 6E: Unable to locate package libcurl-devel 7E: Unable to locate package libopenssl-devel 8E: Unable to locate package openssl-devel 9ub@win:~$

【試したこと】
"E: Unable to locate package"で検索するとapt-getをupdateすると解決する場合があるとのことだったので以下のようにしましたが、失敗しました。

ubuntu

1ub@win:~$ sudo apt-get update 2[sudo] password for ub: 3Hit:1 http://jp.archive.ubuntu.com/ubuntu focal InRelease 4Get:2 http://jp.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] 5Get:3 http://jp.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] 6Get:4 http://jp.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [699 kB] 7Get:5 http://jp.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [705 kB] 8Hit:6 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease 9Ign:7 http://cran.r-project.org/bin/linux/ubuntu InRelease 10Get:8 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB] 11Err:9 http://cran.r-project.org/bin/linux/ubuntu Release 12 404 Not Found [IP: XXXXXXXXXXXXXXXXX] 13Ign:10 https://cran.r-project.org/bin/Linux/ubuntu focal-cran40/ InRelease 14Err:11 https://cran.r-project.org/bin/Linux/ubuntu focal-cran40/ Release 15 404 Not Found [IP: YYYYYYYYYYYYYYYYY] 16Reading package lists... Done 17E: The repository 'http://cran.r-project.org/bin/linux/ubuntu Release' does not have a Release file. 18N: Updating from such a repository can't be done securely, and is therefore disabled by default. 19N: See apt-secure(8) manpage for repository creation and user configuration details. 20E: The repository 'https://cran.r-project.org/bin/Linux/ubuntu focal-cran40/ Release' does not have a Release file. 21N: Updating from such a repository can't be done securely, and is therefore disabled by default. 22N: See apt-secure(8) manpage for repository creation and user configuration details. 23ub@win:~$ sudo apt-get install libxml2-devel libcurl-devel libopenssl-devel openssl-devel 24Reading package lists... Done 25Building dependency tree 26Reading state information... Done 27E: Unable to locate package libxml2-devel 28E: Unable to locate package libcurl-devel 29E: Unable to locate package libopenssl-devel 30E: Unable to locate package openssl-devel 31ub@win:~$

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

UbuntuなどDebianベースのLinuxディストリビューションでは、開発用パッケージの末尾につくのは「-devel」ではなくて「-dev」です。

補足: あなたが参考にした情報は、おそらくRedHatベースのディストリビューションのものでしょう。そちらでは開発用パッケージに「-devel」を付けます。

ですから、Ubuntuでは「libxml2-dev」をインストールしてください。他のパッケージも同様だと思われます。

補足: 単に「-devel」を「-dev」に変えるだけでなく、パッケージ名そのものも異なることがあります。あなたがビルドしたい何かに必要な開発用パッケージを、「Ubuntu(あるいはDebian)用」に解説しているページを探すと手っ取り早いでしょう。

なお、いまどきのaptでは、apt-getではなくaptでインストール(やその他の作業)を行なえます。パッケージの検索もapt search パッケージ名の一部で行なえます。

投稿2020/12/18 03:29

編集2020/12/18 03:38
Daregada

総合スコア11990

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

i113

2020/12/18 09:06

お陰様で上手くいきました。どうも有り難うございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問