Help us understand the problem. What is going on with this article?

apt build-dep がエラーになるときの対処方法

More than 1 year has passed since last update.

新しく立てた仮想マシンなどで apt build-dep を実行すると以下のようなエラーになることがあります。

$ sudo apt build-dep ffmpeg
[sudo] password for koba: 
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list

エラーメッセージの通り、source.listにsourceを取得する先のURIが無いためです。
実際には、source.listの中に書いてはあるのですが、コメントアウトされています。なので、それをアンコメントすればよいです。

$ sudo vi /etc/apt/sources.list

このようにviを開いて、置換します。

:%s/# deb-src/deb-src/
:wq

これで、apt updateを実行してから再度 apt build-depを実行すればエラーにならずに完了します。

$ sudo apt update
$ sudo apt build-dep ffmpeg

関連

ffmpeg 4.0 をlibsrtを有効にしてビルドする
gstreamer をソースからビルドする

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした