【AWS】【EC2】sudo apt -y build-dep XXXでエラー発生・・・ 対処法【ubuntu】

 AWSのEC2でubuntuのインスタンスを作成し、その中で

 I crated the ubuntu environment in the AWS’s EC2 service. And I inputed the following command.

$ sudo apt -y build-dep XXX

のコマンドを実行させると下記のようなエラーが発生してしまいました。

But the following error happend ! 🙁

E: You must put some ‘source’ URIs in your sources.list

 その時の対処策を紹介します!

 Here, I introduce how to solve for the error !

・対処法

 下記コマンドを順番に打って行くと解決しました。

 I can have solved by inputting such the following commands.

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list~
$ sudo sed -Ei ‘s/^# deb-src /deb-src /’ /etc/apt/sources.list
$ sudo apt-get update

 そして最後に初めにエラーの出たbuild-depを行って無事終了です!

 And then, I have succeeded in the command which has error at first time.

$ sudo apt -y build-dep XXX

コメントする

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です