Ubuntu HowTo: Can’t install/remove libnss3 on ubuntu 14.04.4 LTS

Original Source Link

I can’t install/remove/resolve the problem caused by libnss3 on my ubuntu 14.04.4 LTS. At the beginning I got a problem on Upwork time tracker (Connection failed) then I followed the steps on this link:https://gist.github.com/alexda14/d0632aed2fbf86c6fee1. then the libnss3 packages messed up my machine. It says ‘Error:BrokenCount > 0. this usually means that your installed packages have unmet dependencies’. I’ve tried everything to solve the conflicts issued but fail.

sudo dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 libnss3-1d:i386      Network Security Service libraries - transitional package
 libnss3:i386         Network Security Service libraries

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 libnss3:amd64        Network Security Service libraries

then

sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of libnss3-1d:i386:
 libnss3-1d:i386 depends on libnss3 (= 2:3.21-0ubuntu0.14.04.1); however:
  Version of libnss3:i386 on system is 2:3.19.2-1ubuntu1.

dpkg: error processing package libnss3-1d:i386 (--configure):
 dependency problems - leaving unconfigured
dpkg: error processing package libnss3:amd64 (--configure):
 package libnss3:amd64 2:3.21-0ubuntu0.14.04.1 cannot be configured because libnss3:i386 is at a different version (2:3.19.2-1ubuntu1)
dpkg: error processing package libnss3:i386 (--configure):
 package libnss3:i386 2:3.19.2-1ubuntu1 cannot be configured because libnss3:amd64 is at a different version (2:3.21-0ubuntu0.14.04.1)
Errors were encountered while processing:
 libnss3-1d:i386
 libnss3:amd64
 libnss3:i386

Remove

sudo apt-get remove --auto-remove libnss3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 brackets : Depends: libnss3 (>= 3.12.6) but it is not going to be installed
 evolution-data-server : Depends: libnss3 (>= 2:3.13.4-2~) but it is not going to be installed or
                                  libnss3-1d (>= 3.12.0~beta3) but it is not going to be installed
 flashplugin-installer : Depends: libnss3 but it is not going to be installed
 gitkraken : Depends: libnss3 but it is not going to be installed
 google-chrome-stable : Depends: libnss3 (>= 3.14.3) but it is not going to be installed
 libcamel-1.2-45 : Depends: libnss3 (>= 2:3.14) but it is not going to be installed
 libnm-util2 : Depends: libnss3 (>= 2:3.13.4-2~) but it is not going to be installed or
                        libnss3-1d (>= 3.12.0~1.9b1) but it is not going to be installed
 libnss3-1d:i386 : Depends: libnss3:i386 (= 2:3.21-0ubuntu0.14.04.1) but 2:3.19.2-1ubuntu1 is to be installed
 libnss3-nssdb : Depends: libnss3 (= 2:3.21-0ubuntu0.14.04.1) but it is not going to be installed
 liboauth0 : Depends: libnss3 (>= 2:3.13.4-2~) but it is not going to be installed or
                      libnss3-1d (>= 3.12.0~1.9b1) but it is not going to be installed
 liboxideqtcore0 : Depends: libnss3 (>= 2:3.13.4-2~) but it is not going to be installed or
                            libnss3-1d (>= 3.12.4) but it is not going to be installed
 libpurple0 : Depends: libnss3 (>= 2:3.13.4-2~) but it is not going to be installed or
                       libnss3-1d (>= 3.12.0~1.9b1) but it is not going to be installed
 libreoffice-core : Depends: libnss3 (>= 2:3.13.4-2~) but it is not going to be installed or
                             libnss3-1d (>= 3.12.0~1.9b1) but it is not going to be installed
 upwork : Depends: libnss3 (>= 2:3.14.3) but it is not going to be installed or
                   libnss3 (>= 3.14.3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Check

sudo apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libnss3 : Breaks: libnss3:i386 (!= 2:3.21-0ubuntu0.14.04.1) but 2:3.19.2-1ubuntu1 is installed
 libnss3:i386 : Breaks: libnss3 (!= 2:3.19.2-1ubuntu1) but 2:3.21-0ubuntu0.14.04.1 is installed
 libnss3-1d:i386 : Depends: libnss3:i386 (= 2:3.21-0ubuntu0.14.04.1) but 2:3.19.2-1ubuntu1 is installed
E: Unmet dependencies. Try using -f.

Install

sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  acpi gnome-desktop-data gnumeric-common gnumeric-doc libantlr-java
  libchamplain-0.12-0 libchamplain-gtk-0.12-0 libcommons-validator-java
  libdoxia-sitetools-java libgegl-0.2-0 libgoffice-0.10-10-common
  libjavascriptcoregtk-1.0-0 libjdependency-java libjtidy-java
  libmaven-archiver-java libmaven-clean-plugin-java
  libmaven-compiler-plugin-java libmaven-dependency-tree-java
  libmaven-filtering-java libmaven-install-plugin-java
  libmaven-jar-plugin-java libmaven-plugin-tools-java
  libmaven-reporting-impl-java libmaven-resources-plugin-java
  libmaven-shade-plugin-java libming1 libplexus-compiler-java
  libplexus-digest-java libplexus-velocity-java libwebkitgtk-1.0-0
  libwebkitgtk-1.0-common libwerken.xpath-java libxml-xpathengine-perl
  linux-headers-3.13.0-76 linux-headers-3.13.0-76-generic-tuxonice
  linux-headers-3.19.0-25 linux-headers-3.19.0-25-generic
  linux-image-3.13.0-76-generic-tuxonice linux-image-3.19.0-25-generic
  linux-image-extra-3.13.0-76-generic-tuxonice
  linux-image-extra-3.19.0-25-generic linux-tools-3.13.0-76
  linux-tools-3.13.0-76-generic tclx8.4 velocity
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libnss3:i386
The following packages will be upgraded:
  libnss3:i386
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
3 not fully installed or removed.
Need to get 0 B/1.066 kB of archives.
After this operation, 435 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 443812 files and directories currently installed.)
Preparing to unpack .../libnss3_2%3a3.21-0ubuntu0.14.04.1_i386.deb ...
Unpacking libnss3:i386 (2:3.21-0ubuntu0.14.04.1) over (2:3.19.2-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libnss3_2%3a3.21-0ubuntu0.14.04.1_i386.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libnss3/changelog.Debian.gz', which is different from other instances of package libnss3:i386
Errors were encountered while processing:
 /var/cache/apt/archives/libnss3_2%3a3.21-0ubuntu0.14.04.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Edit: This is also affect Ubuntu Software Center with this message: ‘New software can’t be installed,…’.. I can’t install/remove any software. repair don’t work!

Okay. I managed to fix my problem. Actually it my own mistakes. I have 64bit ubuntu but installed libnss3 for i386.

apt-cache policy libnss3*

to find out all libnss3 dependencies then purge them:

sudo apt-get purge libnss3-1d:i386 libnss3-nssdb:i386 libnss3-1d-dbg:i386 libnss3-dbg:i386 libnss3:i386 libnss3-dev:i386 libnss3-tools:i386

Tagged : / /

Making Game: Inserting SVG image inside Word reduces its quality

Original Source Link

It’s really bizarre. When I insert an SVG image in my thesis in Word and export it to PDF the quality is much worse than if I create a new Word document insert it and export to PDF.

The image is exactly the same.
The size is exactly the same.

I tried Do not compress option for image quality and when exporting I chose Optimize For Image quality, yet none of those things fixed it.

As far as I know these are all the options for altering the quality of an image in Word.

The Word version I am using is Word 2019. Can someone help me out? Thanks in advance.

Tagged :

Code Bug Fix: Oracle Database 19c Sample Schemas :: import sample from Oracle SQL Developer GUI instead of command line

Original Source Link

I have a Microsoft background and I’m learning Oracle products.

I was able to import Oracle Database 19c Sample Schemas on a Docker Oracle image from command line following this guide.

I now would like to know if there is a way to import the same sample through a GUI using Oracle SQL Developer.

With SSMS is quite simple to import/export databases, row data, CSV, etc… but I don’t see the same tool for Oracle SQL Developer.

EDIT:

@thatjeffsmith suggested to right click on tables > Data Import Wizard, but when I select “db-sample-schemas-master” I only find the samples with .sql files in it and .sql files cannot be imported with this tool

enter image description here

It depends.

The .SQL files can be ran through the SQL worksheet via F5 no problem.

The sqlldr scenarios, you could rename the .dat files to .dsv files.

Right click on your table, like Sales History SH entries, choose Import Data, and walk the wizard.

But, it would be much easier to just follow the instructions as is, especially if you are new to Oracle.

Tagged : / /

Server Bug Fix: How to restore .img file into a directory?

Original Source Link

I have a mounted backup disk with snapshot images taken using LVM and the dd command.

Briefly, the backups are made with:

lvcreate --snapshot -L 100M --name snap /dev/target
dd conv=sparse if=/dev/snap of=/mnt/backups/snap.img

What is the simplest way to restore the files of the disk image into a directory on the main file system?

This is for quickly pulling out files, not for restoring a working volume root. I don’t want to mess around creating logical volumes. I just want to copy the files into a folder.

I have tried dd if=/mnt/backups/snap.img of=/path/to/restore but this just copies the image and doesn’t unpack the files.

Tagged : / / /

Math Genius: vector bundles and cocycles

Original Source Link

I need a detailed solution to a self-study book’s exercise (Bott & Tu’s Differential forms in algebraic topology, exercise 6.2).

Show that two vector bundles on $M$ are isomorphic iff their cocycles
relative to some open cover are equivalent.

I can show it in one direction: isomorphism implies cocycles equivalent, but not the other.
Please give detail answer; I am totally burnt out by and do not need “hints” 🙂

The proof below is a rewriting of the proof of Theorem 2.7 in Fibre Bundles by Dale Husemoller.

Let $M$ be a manifold, ${U_alpha}$ an open cover of $M$, and $pi:Eto M$ and $pi’:E’to M$ two vector bundles of rank $n$ over $M$, with trivializations ${phi_alpha}$ and ${phi_alpha’}$, whose transition functions are denoted by $g_{alphabeta}$ and $g_{alphabeta}’$, respectively. By assumption, $g_{alphabeta} (x) = lambda_alpha g_{alphabeta}’ lambda_beta^{-1} (x)$ for all $xin U_alpha cap U_beta$; here $lambda_alpha:U_alphato GL(n,mathbb{R})$ for all $alpha$. We wish to construct a bundle isomorphism $f:Eto E’$.

For each $alpha$, we define $f_alpha:U_alpha times mathbb{R}^n to U_alpha times mathbb{R}^n$ by $f_alpha(x,y) = (x,lambda_alpha(x)^{-1}y)$, and we define $f:Eto E’$ by requiring that $f=phi_alpha’ f_alpha phi_alpha^{-1}$, or $phi_alpha’ f_alpha = f phi_alpha$ on $U_alpha times mathbb{R}^n$. By construction, $f$ is linear on corresponding fibers.

So far $f$ is only defined locally; to prove that $f$ is a globally defined bundle map, let $(x,y)in (U_alpha cap U_beta) times mathbb{R}^n$, and we will check two definitions of $f$ (using the indices $alpha$ and $beta$, respectively) agree. That is, we want to show $phi_beta’ f_beta(x,y) = f phi_beta(x,y)$ implies (hence equivalent to) $phi_alpha’ f_alpha(x,y) = f phi_alpha(x,y)$. For this we make the following calculation:
$$
phi_beta’ f_beta(x,y) = phi_beta'(x,lambda_beta(x)^{-1} y)
=phi_alpha'(x,g_{alphabeta}'(x) lambda_beta(x)^{-1} y)
=phi_alpha'(x,lambda_alpha(x)^{-1} g_{alphabeta}(x) y)
=phi_alpha’ f_alpha(x, g_{alphabeta}(x) y) .
$$
Using $fphi_beta(x,y) = fphi_alpha(x,g_{alphabeta}(x) y)$, we have $fphi_alpha(x,g_{alphabeta}(x) y) = phi_alpha’ f_alpha(x,g_{alphabeta}(x) y)$, or $f phi_alpha = phi_alpha’ f_alpha$. Therefore, $f$ is a well-defined global bundle map.

It is clear that $f$ is locally invertible (all $phi_alpha$, $phi_alpha’$ and $lambda_alpha$ are), and its local inverses paste together to give a bundle map by the same consideration. Hence $f$ is a bundle isomorphism.

Tagged : / / /

Server Bug Fix: How to prevent node js from serving .git folders and all the files under .git

Original Source Link

I know that using .htaccess file can restrict files to be served under .git but how do i acheive the same if i’m using node.js server. I use forever to start/stop the servers.

If you are using Express, the answer is here: https://stackoverflow.com/a/11911629

You did not provide enough information on your setup to give a more detailed answer.

Tagged : / /

Ubuntu HowTo: Ubuntu 20 plays bongo sound in headset at login then no sound on system once logged in

Original Source Link

I am having no luck in getting sound once I’m logged into a session on my Ubuntu machine.

I have tried the suggestions within the post below:

No sound – Ubuntu 20.04 LTS

I have also tried all the solutions in:

https://itsfoss.com/fix-sound-ubuntu-1304-quick-tip/

pavucontrol gives me the following message:

Volume control

inxi -SMA gives me:


System:
  Host: JME Kernel: 5.4.0-31-generic x86_64 bits: 64 Desktop: Gnome 3.36.2 
  Distro: Ubuntu 20.04 LTS (Focal Fossa) 
Machine:
  Type: Desktop Mobo: ASUSTeK model: H110M-R v: Rev X.0x 
  serial: <superuser/root required> UEFI: American Megatrends v: 3401 
  date: 03/20/2017 
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio 
  driver: snd_hda_intel 
  Device-2: AMD Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] 
  driver: snd_hda_intel 
  Device-3: GN Netcom Jabra Link 370 type: USB 
  driver: jabra,snd-usb-audio,usbhid 
  Device-4: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo 
  Sound Server: ALSA v: k5.4.0-31-generic 

I see the following in the sound settings

enter image description here

this is a fresh upgrade from Ubuntu 18. And, just in case, yes I have tried muting/unmuting my headset; repeatedly!

Tagged : / /

Linux HowTo: How to add a new section to a numbered list in MS Word?

Original Source Link

In Word how can I add a section into a numbered list?

I have a large software requirements document that is organized using a numbered list, so I have a few paragraphs as 1, then maybe some sub-points as 1.1, 1.2, 1.3.

I am having trouble where Word is starting a new number and not letting me edit into the current flow of the sequence.

How can I add a new paragraph into a section such as this so that I can add a new paragraph in-between existing ones and have the rest re-numbered?

Which version of MS Word are we talking about? This would be helpful to know to quote the menu items correctly…

Anyway, try right-clicking on your newly inserted list item (which as I understand at this point has an incorrect number), choose Numbering > Set Numbering Value (bottom of the menu). In the pop-up choose Continue from previous list and adjust the numbering value if necessary.

As long as you have inserted it in your main list the rest of your existing numbered items will be re-numbered accordingly.

Hopefully, this helps.

If you press Enter twice on any numbered line then unnumbered section appears between two continiously numbered lists.

I’ve just encountered this problem and solved it. I am using Word 2013.

The situation was: I had a numbered list with defined styles for heading 1 and heading 2 in order to be able to autogenerate Table of Contents. I had following headings in a multileveled list: 1., 2., 3., 3.1., 3.2., 3.3., 3.4., 4., 4.1., 4.2., 4.3. and I wanted to add heading of level 2 between 3.1 and 3.2. My first try was (as propably everyone would do) to type text and select a list option and hope that it will somehow automatically merge with existing list. It didn’t happen, only new list has started.

Solution:

  1. Type text wherever you wish to insert a heading of whichever level
  2. Select style for typed text for according level (f.ex. “Heading 2”)
  3. Select multilevel list type (third list-type button in “paragraph” frame) and from scrolldown menu choose the one list in “Lists in current documents” (see pic.). This will sync styles of numbering of new list and existing one.
  4. Right-click on the number beside heading (still incorrect) and choose “Continue Numbering”. This will add this heading to existing list.
Tagged : /

Ubuntu HowTo: Headset Microphone issues in Kubuntu 20.04

Original Source Link

I have Kubuntu 20.04 on my fairly new Dell XPS 13. When I start the computer, by default I am seeing 2 microphones in Kubuntu Audio settings. (At this point there is no headset connected, I confirmed that in the output devices also!)

  • Internal Microphone
  • Headset Microphone

Under pavucontrol, in the Input Devices tab the port has the following

  • Internal Microphone (plugged in)
  • Headset Microphone (plugged in)
  • Microphone (unplugged)

Once I connect my headphones (it’s a headphones + microphone combo jack), in pavucontrol the Microphone entry changes from (unplugged) to (plugged in) and becomes the selected value. When this happens I cannot hear anything, even though the output device is Headphones. I have to change the input Device to either Headset Microphone or Internal Microphone.

However, in all these combinations, the only time the microphone works is when it is set to Internal Microphone. In this case the laptop Microphone is used.

I have confirmed that there is no issue with my headphones.

And the output from pactl list sources

pactl list sources
Source #0
    State: RUNNING
    Name: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
    Description: Monitor of Built-in Audio Analog Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 48000Hz
    Channel Map: front-left,front-right
    Owner Module: 7
    Mute: no
    Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor of Sink: alsa_output.pci-0000_00_1f.3.analog-stereo
    Latency: 0 usec, configured 40000 usec
    Flags: DECIBEL_VOLUME LATENCY 
    Properties:
        device.description = "Monitor of Built-in Audio Analog Stereo"
        device.class = "monitor"
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0x604b118000 irq 170"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1f.3"
        sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "02c8"
        device.form_factor = "internal"
        device.string = "0"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Formats:
        pcm

Source #1
    State: RUNNING
    Name: alsa_input.pci-0000_00_1f.3.analog-stereo
    Description: Built-in Audio Analog Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 7
    Mute: no
    Volume: front-left: 7196 /  11% / -57.56 dB,   front-right: 7196 /  11% / -57.56 dB
            balance 0.00
    Base Volume: 6554 /  10% / -60.00 dB
    Monitor of Sink: n/a
    Latency: 0 usec, configured 40000 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "ALC3271 Analog"
        alsa.id = "ALC3271 Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0x604b118000 irq 170"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1f.3"
        sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "02c8"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analog Stereo"
        device.description = "Built-in Audio Analog Stereo"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        analog-input-internal-mic: Internal Microphone (priority: 8900, available)
        analog-input-headphone-mic: Microphone (priority: 8700, not available)
        analog-input-headset-mic: Headset Microphone (priority: 8800, available)
    Active Port: analog-input-internal-mic
    Formats:
        pcm

I do hope someone can help with this, it’s quite annoying that the headset mic does not work, because I can’t type while on call unless I mute myself, which is not the most practical during meetings!

Thanks

Tagged : / / /

Math Genius: Polynomials, Rouche’s theorem and index of vector fields

Original Source Link

In the proof of Rouche’s theorem I saw in a book, there are two points I failed to understand, or failed to prove myself. (if you aren’t familiar with the theorem, please try to look at the two statements here below and explain them regardless of the theorem):

  1. “Consider the complex plane. It’s not difficult to show that the index of a curve $C$ with respect to a vector field $v$ is equal to the sum of indices of singular points, i.e., those at which $v(z) = 0$.”

  2. “If $f(z)$ is a polynomial, and let $v(z) = f(z)$, where $v$ is a vector field, then the index of the singular point $z_0$ is equal to the multiplicity of the root $z_0$ of $f$.”

I am having trouble understanding this; can anyone please help?

  1. If by index of the curve C they mean the integral

$$ frac{1}{2 pi i} int_gamma frac{v'(z)}{v(z)} dz ,$$

which is what I am guessing that they mean, then this follows from the residue theorem applied to the complex valued function $v(z)$.

  1. The index of a vector field at $z_0$ is defined to be the winding number you get for taking a small circle about $z_0$ of winding number $1$ and computing the winding number of its image about $0$. This can be computed as:

$$ frac{1}{2 pi i} int_gamma frac{v'(z)}{v(z)} dz ,$$

where $gamma$ is a parametrization of a sufficiently small circle which winds around $z_0$ once. For $v(z) = f(z)$ and $f(z_0) = 0$, we can write $f(z) = (z-z_0)^n g(z)$, where $n$ is maximal such that $g(z_0) neq 0$. Then,

$$ f'(z) = n (z-z_0)^{n-1} g(z) + (z-z_0)^n g'(z) $$

and

$$ frac{f'(z)}{f(z)} = frac{n}{z-z_0} + (z-z_0)^n frac{g'(z)}{g(z)}.$$

The second term above is analytic in this region if we make $gamma$ a small enough circle so that $g(z)$ is non-zero in the interior. Thus, when we integrate we just get that the index is

$$ frac{1}{2 pi i} int_gamma frac{n}{z – z_0} dz = n ,$$

which is the multiplicity of $z_0$.

Tagged : / / / /