I am having problems installing debian on virtualbox. The installation step fails when trying to configure packet manager.

The guy in the following post had them solved by editing a certain file during one of the installation phases.


I am completely new to Linux, command lines in general and have no idea how to: "Edit /usr/lib/apt-setup/generators/50mirror.ubuntu and comment out the two lines with db_metaget and db_subst statements after the comment "Text is variable for Debian"."

could someone show some basic commands that would do it? :) I've already navigated to /usr/lib/apt-setup/generators/ and found the 50mirror file.

How should I proceed? How do I close the shell and return to the installation afterwards?

UPDATE: for anyone, trying to install linux on VirtualBox, install VirtualBox using administrator privileges. Then launch it with them as well. Worked for me :)

  • Please tell us what problem you are attempting to fix. – terdon May 5 '14 at 11:45

The easiest way to edit a file from the terminal for a beginner is to use nano.

To start nano and open a file:

nano path/to/file

When you are in nano, you can use Ctrl+G to get help, Ctrl+O to save the file and Ctrl+X to exit nano. These are listed at the bottom of the screen but with the ^ character for Ctrl.

This beginner's guide to nano might be helpful.

You can get back to the main install process by pressing Left+Alt+F1.

  • Thanks :) Nano is just what I needed. Although alt-F7 doesn't work for me. – Morton May 5 '14 at 12:00
  • Sorry, that should have been Ctrl+Alt+F7. Have edited answer to reflect that. – jamtin May 5 '14 at 12:18
  • That didn't work as well. Although I've decided to try all alt-F* combinations and alt-F1 returned me to the installations screen, which is what I needed. Thanks for the help :) P.S. this didn't solve my installation problem though ^^ – Morton May 5 '14 at 12:26
  • Sorry, I was thinking of a normal running system. Thanks for reporting what worked. Install error messages and logs are redirected to the fourth console. You can access this console by pressing Left Alt+F4. Maybe looking at that might give you a clue as to what is going wrong. – jamtin May 5 '14 at 12:38

Make sure that the words db_metaget and db_subst present only on the lines which you want to comment out. Now try these commands on terminal,

sudo sh -c "sed -i 's/\(.*db_metaget.*\)/#\1/g' /usr/lib/apt-setup/generators/50mirror.ubuntu"
sudo sh -c "sed -i 's/\(.*db_subst.*\)/#\1/g' /usr/lib/apt-setup/generators/50mirror.ubuntu"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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