Skip to content

Blog

Fix apt packages

Sometimes when installing apt packages, we get an error saying package can't be installed as it depends on some other package which is not available. I tried installing libedataserver which is required for Gnome Task Widget. However, I was shown the following error in my terminal.

Text Only
1
2
3
4
5
6
7
8
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gir1.2-edataserver-1.2 : Depends: libedataserver-1.2-26 (= 3.44.4-0ubuntu1) but 3.44.4-0ubuntu1.1 is to be installed

Then I listed available versions for libedataserver-1.2-26

Text Only
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
> apt policy libedataserver-1.2-26

libedataserver-1.2-26:
  Installed: 3.44.4-0ubuntu1.1
  Candidate: 3.44.4-0ubuntu1.1
  Version table:
 *** 3.44.4-0ubuntu1.1 100
        100 /var/lib/dpkg/status
     3.44.4-0ubuntu1 500
        500 http://mirrors.piconets.webwerks.in/ubuntu-mirror/ubuntu jammy-updates/main amd64 Packages
     3.44.0-2 500
        500 http://mirrors.piconets.webwerks.in/ubuntu-mirror/ubuntu jammy/main amd64 Packages

I saw that version 3.44.4-0ubuntu1.1 was installed and it was available in any repository. I tried installing version 3.44.4-0ubuntu1 but again got following error message

Text Only
1
2
3
4
5
6
7
The following packages will be REMOVED:
  chrome-gnome-shell evolution-data-server gdm3 gnome-calendar gnome-contacts gnome-session gnome-shell gnome-shell-extension-appindicator
  gnome-shell-extension-desktop-icons-ng gnome-shell-extension-prefs gnome-shell-extension-ubuntu-dock gnome-shell-extensions
  gnome-shell-pomodoro gnome-todo libebackend-1.2-10 libebook-1.2-20 libebook-contacts-1.2-3 libecal-2.0-1 libedata-book-1.2-26
  libedata-cal-2.0-1 libedataserverui-1.2-3 libfolks-eds26 ubuntu-session
The following packages will be DOWNGRADED:
  libedataserver-1.2-26

I did't want to remove any packages. And downgrading libedataserver would remove all these required packages. I searched the internet and stumbled upon a similar issue on stackoverflow.

I followed the advice posted on stackoverflow, and created a new file named /tmp/a_p with the following content. This file basically sets priority for apt packages. It sets the highest priority for live packages in repositories.

Text Only
1
2
3
Package: *
Pin: release n=*
Pin-Priority: 1001

And then executed sudo apt-get -o Dir::Etc::Preferences=/tmp/a_p dist-upgrade. Voila! All my packages were fixed and I was able to install Gnome Task Widget.

Build LineageOS 20 kernel with wireguard module on linux

Install required packages

Bash
1
sudo apt install bc bison build-essential ccache curl flex git git-lfs gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev python3 python-is-python3

Auto sync GIT repos in MAC

Use the following to auto-commit your changes in git repo. The commit will include the file changed. You can control the monitor interval by changing the variable sleeptime in git-commit-repos.sh. All the git operations are logged in /tmp/gitwatch-commit.log.

Export all pdf notes at once

I already have jekyll serving markdown files. So, I thought what if I could also add my skim (a MAC pdf reader) notes to it. After searching and going through skim sourceforge wiki, I collected this script to do this.

How to make effective Flash Cards

This is collection of text on making effective anki cards gathered from various sources. I have been using anki for almost 2 years. It has changed how I think, how I form connections, how I learn and how I remember things.

“Every time you make a mistake carry out a post-mortem and try to figure out the lessons in the experience. Think about what you would need to know to prevent that mistake from occurring again, and turn this insight into new flashcards.”