2

I follow MariaDB docs on how to build MariaDB on my Ubuntu.

It says run

On a Debian based distribution:
apt-get build-dep mariadb-server-10.X
where X is the suffix of the major version.

So I run

sudo apt-get build-dep mariadb-server-10.5

and get this error:

Reading package lists... Done
E: You must put some 'deb-src' URIs in your sources.list

This error hint message is meaningless to me.


Even tried

sudo apt-get build-dep mariadb-server-10.5
sudo apt build-dep mariadb-server-10.5
sudo apt build-dep mariadb-server-10.4
sudo apt build-dep mariadb-server-10.3

Also, used a simpler command and yet I get the same problem:

$ sudo apt-get build-dep build-essential
Reading package lists... Done
E: You must put some 'deb-src' URIs in your sources.list

How to fix this error?

My Ubuntu is a server with a gui desktop installed on top of it

$ uname -a
Linux myserver 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

PS. While I probably can use apt install, I do not really want to install anything more than it is mandated.

0

1 Answer 1

1

The list of your APT repositories is here: /etc/apt/sources.list

In this file, there will be some lines that says:

deb http://archive.ubuntu.com/ubuntu focal universe
# deb-src http://archive.ubuntu.com/ubuntu focal universe
deb http://archive.ubuntu.com/ubuntu focal-updates universe
# deb-src http://archive.ubuntu.com/ubuntu focal-updates universe

(Note: You may have a prefix in front of "archive" - for instance, since I'm in Denmark, for me it's dk.archive.ubuntu.com)

Since MariaDB is part of the "Universe" packages (this can be checked on packages.ubuntu.com) and you want to bulid from the source files, you have to edit the file with sudo nano /etc/apt/sources.list and uncomment the deb-src lines, like this:

deb http://archive.ubuntu.com/ubuntu focal universe
deb-src http://archive.ubuntu.com/ubuntu focal universe
deb http://archive.ubuntu.com/ubuntu focal-updates universe
deb-src http://archive.ubuntu.com/ubuntu focal-updates universe

I imagine this should do the trick.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.