E: The method driver /usr/lib/apt/methods/https could not be found.

June 18, 2015 Leave a comment

Problem:
I was getting the following error when trying to install Wireshark

E: The method driver /usr/lib/apt/methods/https could not be found.

# apt-get install wireshark
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libc-ares2 libsmi2ldbl libwireshark-data libwireshark5 libwiretap4
libwsutil4 wireshark-common
Suggested packages:
snmp-mibs-downloader wireshark-doc
The following NEW packages will be installed:
libc-ares2 libsmi2ldbl libwireshark-data libwireshark5 libwiretap4
libwsutil4 wireshark wireshark-common
0 upgraded, 8 newly installed, 0 to remove and 1 not upgraded.
Need to get 13.4 MB/13.6 MB of archives.
After this operation, 78.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
libsmi2ldbl libc-ares2 libwsutil4 libwiretap4 libwireshark-data
libwireshark5 wireshark-common wireshark
Install these packages without verification? [y/N] y
Err http://ftp.it.debian.org/debian/ testing/main libwsutil4 amd64 1.12.4+gb4861da-1
404 Not Found
Err http://ftp.it.debian.org/debian/ testing/main libwiretap4 amd64 1.12.4+gb4861da-1
404 Not Found
Err http://ftp.it.debian.org/debian/ testing/main libwireshark-data all 1.12.4+gb4861da-1
404 Not Found
Err http://ftp.it.debian.org/debian/ testing/main libwireshark5 amd64 1.12.4+gb4861da-1
404 Not Found
Err http://ftp.it.debian.org/debian/ testing/main wireshark-common amd64 1.12.4+gb4861da-1
404 Not Found
Err http://ftp.it.debian.org/debian/ testing/main wireshark amd64 1.12.4+gb4861da-1
404 Not Found
E: Failed to fetch http://ftp.it.debian.org/debian/pool/main/w/wireshark/libwsutil4_1.12.4+gb4861da-1_amd64.deb 404 Not Found

E: Failed to fetch http://ftp.it.debian.org/debian/pool/main/w/wireshark/libwiretap4_1.12.4+gb4861da-1_amd64.deb 404 Not Found

E: Failed to fetch http://ftp.it.debian.org/debian/pool/main/w/wireshark/libwireshark-data_1.12.4+gb4861da-1_all.deb 404 Not Found

E: Failed to fetch http://ftp.it.debian.org/debian/pool/main/w/wireshark/libwireshark5_1.12.4+gb4861da-1_amd64.deb 404 Not Found

E: Failed to fetch http://ftp.it.debian.org/debian/pool/main/w/wireshark/wireshark-common_1.12.4+gb4861da-1_amd64.deb 404 Not Found

E: Failed to fetch http://ftp.it.debian.org/debian/pool/main/w/wireshark/wireshark_1.12.4+gb4861da-1_amd64.deb 404 Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

Then when I tried to run a apt-get update

# apt-get update
Get:1 http://ftp.nl.debian.org jessie InRelease [134 kB]
Get:2 http://ftp.debian.org jessie-updates InRelease [126 kB]
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?

Finally when I tried to install apt-transport-https

# apt-get install apt-transport-https
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 137 kB of archives.
After this operation, 226 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
apt-transport-https
Install these packages without verification? [y/N] y
Err http://ftp.it.debian.org/debian/ testing/main apt-transport-https amd64 1.0.9.9
404 Not Found
E: Failed to fetch http://ftp.it.debian.org/debian/pool/main/a/apt/apt-transport-https_1.0.9.9_amd64.deb 404 Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

Solution:
I edited /etc/apt/sources.list

I remove references to ftp.it.debian.org and added ftp.us.debian.org

I then ran
# apt-get check

That seemed to fix it. I was then able to run
# apt-get update
# apt-get install apt-transport-https
# apt-get install wireshark

In retrospect
I did google the error but the issues that other users were reporting were not related to mine. I think that the main issue was that the ftp.it.debian.org site I was using was not available. Thus the 404 errors that I was getting. The issue was staring me in the face :-)

Categories: debian Tags:

Restart fluxbox off the command line

May 7, 2015 Leave a comment

Problem:
When switching between 1 and 2 screens, I kept on manually having to restart fluxbox.

Solution:
fluxbox-remote command allows me to restart fluxbox using a script. As I already have a script that does the switching between 1 and 2 screens this was pretty neat.

To configure
1. Edit ~/.fluxbox/init change

session.screen0.allowRemoteActions: false
to
session.screen0.allowRemoteActions: true

2. Restart fluxbox using the menu.

3. Open a terminal and run the following command

$ fluxbox-remote restart


Source:

https://www.linuxquestions.org/questions/slackware-14/how-do-i-run-menu-and-logout-from-the-command-line-in-fluxbox-864919/

Vim – Using undo branches

April 16, 2015 Leave a comment

This is a pretty neat feature that I did not know existed. I have only used u, U and CTRL-R, but a situation arose where multiple undo’s and redo’s was necessary.

:h undolist has clear documentation on how it works.
g+ Go to newer text state. With a count repeat that many times. {not in Vi} See :help g+ for more.
g- Go to older text state. With a count repeat that many times. {not in Vi} See :help g- for more.

For more, see below:
http://vim.wikia.com/wiki/Using_undo_branches

Less – Adding line numbers

April 2, 2015 Leave a comment

Problem:

My initial problem was how to view line numbers when using less. As I looked into this I discovered more and more ways of using less that I did not know.

Solution:

1. less -N file.txt

If you have already viewed the file then typing

-N will enable line numbers while
-n will disable line numbers.

2. To go a specifice line
g N to move upwards to a particular line. The default is 1 (ie g1) and it gets you to the first line of the file.
G N to move forward to a particular line. G alone is the default that gets you to the end of the file.

Categories: bash

Duolingo – Free language learning platform

April 2, 2015 Leave a comment

Have a look at http://www.duolingo.com if you are interested in learning a new language.

duolingo

Duolingo /ˈdjuːɵˌlɪŋɡoʊ/ is a free language-learning and crowdsourced text translation platform. The service is designed so that, as users progress through the lessons, they simultaneously help to translate websites and other documents.[1][2] As of 23 March 2015, Duolingo provides Latin American Spanish, French, German, Brazilian Portuguese, Italian, Dutch, Irish, Danish, Swedish and Turkish courses for English speakers, as well as American English for Spanish, French, German, Portuguese, Italian, Greek, Dutch, Russian, Polish, Turkish, Hungarian, Romanian, Japanese, Hindi, Indonesian, Korean, Vietnamese, and Czech speakers.

Source: https://en.wikipedia.org/wiki/Duolingo

100 Vim commands

March 25, 2015 Leave a comment

http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know

This caught my eye

Window spliting
ctrl-w up arrow Puts cursor in top window
ctrl-w ctrl-w Puts cursor in next window
ctrl-w_ Maximise current window
ctrl-w= Gives the same size to all windows
10 ctrl-w+ Add 10 lines to current window
:vsplit file Split window vertically
:sview file Same as :split in readonly mode
:hide Close current window
:­nly Close all windows, excepted current
:b 2 Open #2 in this window

And lead me to reading “:help split” in vim

Categories: vim Tags:

Readonly Content cannot be changed

March 2, 2015 Leave a comment

Problem:
Apparently, unbeknownst to me, my libreoffice document has Microsoft Forms. All attempts to delete it gave a warning about “Readonly content can not be changed…”

Solution:
Found the solution gone here http://mednis.info/wp/?p=168

Follow

Get every new post delivered to your Inbox.

Join 41 other followers