error while install pcap using "npm install pcap" - node.js

I am developing a packet capture application in nodejs.
When I issue the command npm install pcap, I have this error:
Can someone help me to solve? Thanks

Thanks, this (enter link description here) helped me a lot.
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo dpkg --configure -a && sudo apt-get update && sudo apt-get -y upgrade
sudo aptitude install nodejs
sudo apt-get install libpcap-dev git
npm install https://github.com/mranney/node_pcap.git.
Now It is working find.

Related

Getting an error when installing the .Net 5 Runtime on Armbian (on an Orange Pi Zero)

I'm trying to install the .Net 5 Runtime on Armbian Focal (Ubuntu 20.04) or Buster (Debian 10), running on an Orange Pi Zero.
So I followed Microsoft's instructions here:
https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu
but on the last step:
sudo apt-get install -y aspnetcore-runtime-5.0
I get this error:
E: Unable to locate package aspnetcore-runtime-5.0
E: Couldn't find any package by glob 'aspnetcore-runtime-5.0'
E: Couldn't find any package by regex 'aspnetcore-runtime-5.0'
I then followed Microsoft's suggestion for installing it manually from here:
https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#apt-troubleshooting
But on the last step, again I get the same error.
Any ideas?
In summary, these are the steps I tried first:
wget https://packages.microsoft.com/config/ubuntu/20.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-5.0
and these are the steps I tried when the above failed:
sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y gpg
wget -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget https://packages.microsoft.com/config/ubuntu/{os-version}/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-5.0
EDIT:
I've previously installed the .Net Core 3.1 Runtime on this exact same setup without any issues. I'm not sure if there is something in .Net 5 that is different which won't allow me to install it
From the first URL you linked: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu
Package manager installs are only supported on the x64 architecture. Other architectures, such as ARM, must install .NET by some other means such as with Snap, an installer script, or through a manual binary installation.
A Pi is an ARM device, so the installation method you are trying to use is not supported.

Can't install nodejs-legacy

I'm trying to follow this tutorial and having issues with Node.js installation. Installing on a Debian VM, and have run the suggested installation command on the nodejs site:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejson
When I run sudo apt-get install nodejs-legacy It gives me this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
nodejs-legacy : Depends: nodejs (>= 0.6.19~dfsg1-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Any ideas about what's going on?
Found this old .txt file with some instructions whilst sorting through junk. Looks like I ended up solving the problem.
sudo apt-get install python3-pip
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential
sudo npm i webpack -g
sudo npm install --global yarn#1.0.2
https://cloud.google.com/community/tutorials/setting-up-postgres
sudo -u postgres psql -c 'create database saleor'
sudo -u postgres psql -c "CREATE ROLE saleor WITH SUPERUSER CREATEDB CREATEROLE LOGIN ENCRYPTED PASSWORD 'saleor';"
sudo -u postgres psql -c 'grant all privileges on database saleor to saleor;'
sudo apt-get install python3-venv
pyvenv env1
source env1/bin/activate
deactivate
sudo apt-get install git
git clone https://github.com/mirumee/saleor.git
cd saleor
pip3 install -r requirements.txt
export SECRET_KEY='yourkey'
python3 manage.py migrate
yarn
sudo apt-get install libfontconfig
yarn run build-assets

Ubuntu 16.04 error with apt-get

Yesterday I updated Ubuntu from 14.04 to 16.04, when I tried to install git, I got this error:
The package linux-headers-4.4.0-65 needs to be reinstalled, but I
can't find an archive for it.
Then I tried to install another software, to the same error.
First you need to
sudo apt-get update
Then
sudo apt-get install git
I had a similar problem on Kali-Linux once. The thing that worked for me was:
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get update && sudo apt-get dist-upgrade

How do delete deb package with dependencies

I'm trying to delete linux kernel deb package using command sudo dpkg -r linux-header-3.19.8.992 but fails saying dependencies are there
sudo apt-get purge <package-name>
sudo apt-get autoremove
sudo apt-get remove packagename
or
sudo dpkg -r package_name
for more info https://askubuntu.com/questions/22200/how-to-uninstall-a-deb-package

Dependency issue: sun-java6-jdk (bindiff)

I am trying to install bindiff. When I try to install through archive manager I am welcomed by the following message "Dependency is not satisfiable: sun-java6-jre". (I am running ubuntu 12.10)
I have tried adding a repository
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
This did not work.
I also currently have java 7 installed, and have done sudo apt-get update
I tried "sudo apt-get install sun-java6-jdk" and I receive the following:
sudo apt-get install sun-java6-jdk Reading package lists... Done Building dependency tree
Reading state information... Done Package sun-java6-jdk is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
SOLVED:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get remove java-common
sudo apt-get install oracle-java6-installer
sudo apt-get purge java common
Use the following terminal commands:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get remove java-common
sudo apt-get install oracle-java6-installer
sudo apt-get purge java common

Resources