LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   dpkg --set-selections fails to find hundreds of packages (https://www.linuxquestions.org/questions/linux-software-2/dpkg-set-selections-fails-to-find-hundreds-of-packages-4175617954/)

lucmove 11-19-2017 05:39 PM

dpkg --set-selections fails to find hundreds of packages
 
I have a desktop machine running Debian 9.
I have a notebook running Debian 9.

I copied all my /root and home directories over to the notebook.

I copied /etc/apt/sources.list over to the notebook.

I added all the necessary keys, until no errors are displayed in 'apt-get update'.

I exported my selection from the desktop:
# dpkg --get-selections > /installed-software-20171119.txt

I sent that file to the notebook and imported the selection:
# dpkg --set-selections < /installed-software-20171119.txt

apt throws hundreds of errors at me that look like this:
dpkg: warning: package not in status nor available database at line 1229: xsel

What am I doing wrong?

batman23 11-22-2017 11:39 AM

rsync
 
Did you use rsync?

Wow, does your machine that you copied all that to, boot up?

lucmove 11-22-2017 09:02 PM

Solved it.

How I was doing it:

- Copy /etc/apt/sources.list over to notebook.
- Add necessary keys.
- Update apt:
# apt-get update
- Export selection from desktop:
# dpkg --get-selections > /installed-software-20171119.txt
- Send file to notebook and import selection:
# dpkg --set-selections < /installed-software-20171119.txt
- Get puzzled at huge list of errors.
- Update apt AGAIN:
# apt-get update
- Try again:
# dpkg --set-selections < /installed-software-20171119.txt
- Watch huge list of errors AGAIN and get mad.

The correct way to do it:

- Copy /etc/apt/sources.list over to notebook.
- Add necessary keys.
- Export selection from desktop:
# dpkg --get-selections > /installed-software-20171119.txt
- UPDATE DSELECT!!!!:
- dselect update
- Send file to notebook and import selection:
# dpkg --set-selections < /installed-software-20171119.txt
- Run dselect and choose (I)nstall.


All times are GMT -5. The time now is 12:30 AM.