The officially official Devuan Forum!

You are not logged in.

#1 2020-05-07 17:11:24

Ulysses_
Member
Registered: 2020-05-07
Posts: 25  

SOLVED: Package no longer known to apt after you remove it

Trying to set up devuan as a wifi hotspot. For everything to work fine with the given wifi dongle, a little workaround is needed: you must remove package firmware-zd1211 and reconnect the wifi connection.

sudo apt remove firmware-zd1211

But if you then try to install the same package (needed if the wifi dongle is unplugged and plugged back in),

sudo apt install firmware-zd1211

then it says "Unable to locate package firmware-zd1211"

The package has just vanished! An apt update does not help. What is going on?

The same happens on both ascii and beowulf.

Last edited by Ulysses_ (2020-05-09 15:52:52)

Offline

#2 2020-05-07 17:21:53

Ulysses_
Member
Registered: 2020-05-07
Posts: 25  

Re: SOLVED: Package no longer known to apt after you remove it

Here is some output.

Checking that firmware-zd1211 is already installed:

root@devuan:/home/devuan# apt install firmware-zd1211
Reading package lists... Done
Building dependency tree
Reading state information... Done
firmware-zd1211 is already the newest version (1:1.5-4).
0 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.

Now let's remove it.

root@devuan:/home/devuan# apt-get remove firmware-zd1211
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
firmware-zd1211
0 upgraded, 0 newly installed, 1 to remove and 100 not upgraded.
After this operation, 66.6 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 100348 files and directories currently installed.)
Removing firmware-zd1211 (1:1.5-4) ...

Trying to install it again:

root@devuan:/home/devuan# apt-get install firmware-zd1211
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package firmware-zd1211

So no messing with the repos, default settings for everything. This is a live iso boot.

Offline

#3 2020-05-07 17:53:14

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: SOLVED: Package no longer known to apt after you remove it

I'm guessing you installed from the desktop-live iso. If you want to install wireless firmware from the repo, you need to enable contrib and non-free in /etc/apt/sources.list (or in synaptic). Or, you could just install the package from the local copy in /firmware.
dpkg -i /firmware/firmware-zd1211*.deb

Why do you need to remove and install it? That's weird.

Offline

#4 2020-05-08 05:17:22

Ulysses_
Member
Registered: 2020-05-07
Posts: 25  

Re: SOLVED: Package no longer known to apt after you remove it

Yes this is the desktop-live iso but not installed yet, simply booting it one can reproduce this apparent bug. Even without this particular hardware being present. Simply apt remove followed by apt install shows this apparent bug.

Another unexpected thing is that package firmware-misc-nonfree (which is needed or the wifi dongle won't work) is installed by default even though contrib and non-free are not enabled in /etc/source.list. Isn't devuan FOSS?

If I do not remove firmware-zd1211, the wifi hotspot appears to be working but when a smartphone try to connect to it, it fails. Removing firmware-zd1211, the wifi still seems to be working as if the kernel module is still loaded, and if you then reconnect the wifi connection, the same smartphone can now connect.

Offline

#5 2020-05-08 15:48:17

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: SOLVED: Package no longer known to apt after you remove it

Wireless firmware is installed in the live isos partly for testing that it works with your hardware and partly so that we're not bombarded with questions about how to get wireless working. There's a script to remove all the non-free firmware if you don't want it, and deb packages are included in case you need to reinstall one. (See the included README file.)

The reason non-free and contrib are not enabled in sources.list is so that people who don't want non-free won't accidentally install anything from there.

Offline

#6 2020-05-09 15:50:48

Ulysses_
Member
Registered: 2020-05-07
Posts: 25  

Re: SOLVED: Package no longer known to apt after you remove it

Fair enough. I have written a script to get the wifi working as a hotspot without removing any driver - and be able to unplug and plug in the wifi dongle and get up and running by executing the script again.

Preparation:

apt update
apt -y remove python-wicd
apt -y install network-manager-gnome

# Launch the network manager applet and an output window for it
xfce4-terminal --title=nm-applet -e "sudo -u devuan bash \
-c 'echo This is for the network manager applet; nm-applet' " 2>/dev/null &

Here's the script:

#!/bin/sh

nmcli connection delete my_hotspot 2> /dev/null

nmcli device wifi hotspot con-name my_hotspot ifname wlx0002727ab66a \
ssid my_hotspot password PUT_PASSWORD_HERE

nmcli connection up my_hotspot

Last edited by Ulysses_ (2020-05-09 16:38:32)

Offline

#7 2020-05-09 22:02:28

Ulysses_
Member
Registered: 2020-05-07
Posts: 25  

Re: SOLVED: Package no longer known to apt after you remove it

Have you looked into running such a nonfree driver sandboxed by any chance? Or know someone who knows how to do it?

Offline

Board footer