Hello, I went through Template Manager today and I saw fedora-41 available for install which I selected, as well as an upgrade available for whonix-gateway-17 and whonix-workstation-17, but they were the community-testing versions, but still I opted for the upgrade.
After upgrading, both of them required updates. whonix-workstation-17 was able to update successfully, whonix-gateway-17 did not. It instantly errors out and here is the error message:
Updating whonix-gateway-17
Refreshing package info
Traceback (most recent call last):
File "/run/qubes-update/agent/entrypoint.py", line 98, in <module>
sys.exit(main())
^^^^^^
File "/run/qubes-update/agent/entrypoint.py", line 28, in main
return_code = pkg_mng.upgrade(refresh=not args.no_refresh,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/common/package_manager.py", line 57, in upgrade
result = self._upgrade(
^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/common/package_manager.py", line 94, in _upgrade
result_refresh = self.refresh(hard_fail)
^^^^^^^^^^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/apt/apt_api.py", line 56, in refresh
self.wait_for_lock()
File "/run/qubes-update/agent/source/apt/apt_cli.py", line 55, in wait_for_lock
with self.apt_lock():
File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/apt/apt_cli.py", line 47, in apt_lock
with open("/var/lib/apt/lists/lock", "rb+") as f_lock:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/apt/lists/lock'
Has anyone experienced this? How do I fix it? I would prefer not to have to revert to the stable one.
Hey guys, first day on Qubes, & I’m loving it so far. Just trying to update everything like the installation guide recommends. However I’m having some trouble updating whonix, everything else updated successfully. The weird thing is, immediately post-install, whonix updated itself, and about a hour later a new update was available. Going to post my error message below.
Updating whonix-workstation-17
Traceback (most recent call last):
Refreshing package info
File "/run/qubes-update/agent/entrypoint.py", line 98, in <module>
sys.exit(main())
^^^^^^
File "/run/qubes-update/agent/entrypoint.py", line 28, in main
return_code = pkg_mng.upgrade(refresh=not args.no_refresh,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/common/package_manager.py", line 57, in upgrade
result = self._upgrade(
^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/common/package_manager.py", line 94, in _upgrade
result_refresh = self.refresh(hard_fail)
^^^^^^^^^^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/apt/apt_api.py", line 56, in refresh
self.wait_for_lock()
File "/run/qubes-update/agent/source/apt/apt_cli.py", line 55, in wait_for_lock
with self.apt_lock():
File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/apt/apt_cli.py", line 47, in apt_lock
with open("/var/lib/apt/lists/lock", "rb+") as f_lock:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/apt/lists/lock'
Could you explain a bit further what exactly happened? Whonix doesn’t just update itself out of nowhere.
Nevertheless, it could be possible that another apt process is running in the background, which could be causing some weird issues. You can check it with the following command:
ps aux | grep apt
If that’s the case, kill the process and don’t forget to run sudo dpkg --configure -a afterwards.
The error message suggests that the lock file /var/lib/apt/lists/lock is missing. This could indicate that for some reason the directory itself is not there. You can manually create it using:
sudo mkdir -p /var/lib/apt/lists/
Even though the error suggests that the lock file is missing, it doesn’t hurt to make sure that any leftover lock file from an old process is deleted:
Updating whonix-workstation-17
Traceback (most recent call last):
File "/run/qubes-update/agent/entrypoint.py", line 98, in <module>
sys.exit(main())
^^^^^^
File "/run/qubes-update/agent/entrypoint.py", line 28, in main
return_code = pkg_mng.upgrade(refresh=not args.no_refresh,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/common/package_manager.py", line 57, in upgrade
result = self._upgrade(
^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/common/package_manager.py", line 94, in _upgrade
result_refresh = self.refresh(hard_fail)
^^^^^^^^^^^^^^^^^^^^^^^
File "/run/qubes-update/agent/source/apt/apt_api.py", line 56, in refresh
self.wait_for_lock()
File "/run/qubes-update/agent/source/apt/apt_cli.py", line 55, in wait_for_lock
with self.apt_lock():
File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
Refreshing package info
File "/run/qubes-update/agent/source/apt/apt_cli.py", line 47, in apt_lock
with open("/var/lib/apt/lists/lock", "rb+") as f_lock:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/apt/lists/lock'
Unsure of what to exactly do about this, I never did anything as this is a brand new installation of Qubes OS; I installed Qubes OS yesterday. On top of this when I make a new Whonix qube the Whonix gateway always denies it access to the Internet.
3 dots at bottom of post with answer should have “Solution” option for you as the original poster, will help others who are coming here for same problem.