When installing local DEB packages, you should use dpkg instead of apt, since apt is designed for installing packages from the remote repositories. To install your package with dpkg, use the following command:
sudo dpkg -i /path/to/my/package.deb
Replace /path/to/my/package.deb with the actual path of your own package.
In some cases, this command may fail with missing dependency errors. If this is the case, issue the following command:
sudo apt --fix-broken install
This will install the dependencies. After that, re-run the first dpkg command to install your package.
Alternatively, the program gdebi can be used instead of dpkg, since it has better resolution of dependencies without needing to apt --fix-broken install. To install gdebi, run this command:
sudo apt install gdebi-core
Now you can install your program directly using:
sudo gdebi /path/to/my/package.deb