Puppeteer error: "failed to launch the browser process" - puppeteer

I am trying to run Puppeteer on my new laptop. However, I am getting this error:
node:8144) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/mnt/c/Users/juliu/repos/kmj-sniper/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
What am I missing here?

The error message can either indicate that your operating system is missing the ATK library (libatk), or that this shared library is installed in a location that Puppeteer does not know about, because it is not available from the paths specified in the environment variable LD_LIBRARY_PATH, or has a different name from what is expected.
If the ATK library is missing, what platform your laptop is running will likely determine the answer. If you are running Ubuntu, for example, you could do the following, or similar:
$ sudo apt-get install libatk-bridge2.0-0
On CentOS/RHL, perhaps:
$ sudo yum install atk.x86_64
If the required package is already installed, however, check that LD_LIBRARY_PATH includes the directory where the shared library is installed, and that the filename matches that shown in the error message returned by Puppeteer.

Delete folder node_modules (don't delete the package.json and package-lock.json files) and then run npm i.
It will essentially reinstall all your dependencies.
If that doesn’t work, then try Alex's answer.

Related

ng is not recognized as an internal or external command(Angular 6)

After installing Node(latest version). I ran command npm install #angular/cli -g, it installed angular cli successfully. Then to verify it's installation, I tried to run ng v, but got the error message saying:
"ng is not recognized as an internal or external command".
After some research, I came to know that I need to set the system variable path "C:\Users\jaiprakash.mewada\AppData\Roaming\npm\node_modules#angular\cli\bin", but it still not worked for me.
In place of "C:\Users\jaiprakash.mewada\AppData\Roaming\npm\node_modules#angular\cli\bin", I tried with path "C:\Users\jaiprakash.mewada\AppData\Roaming\npm" only and it worked.
We need to make sure, we are setting up the path of folder, where it can locate the "ng" files as shown below. I guess, in earlier version, ng files used to locate in bin folder.
enter image description here

"Couldn't resolve hostname" while installing package in Octave

I have tried installing a package in Octave using this command:
pkg install signal-1.4.0.taz.gz
but I received the following error:
error: pkg: failed to read package 'signal-1.4.0.taz.gz': Couldn't resolve host name
error: called from
pkg at line 429 column 17
Does somebody know what that means?
You have mis-spelled the name of the package's tarball. It is likely signal-1.4.0.tar.gz rather than signal-1.4.0.taz.gz (Note that one has TAR and the other has TAZ in the extension)
pkg install signal-1.4.0.tar.gz
Essentially what is happening, is that Octave is unable to find the file signal-1.4.0.taz.gz on the file system (due to the mis-spelling) so then it attempts to download the file from the internet. When it tries to resolve signal-1.4.0.taz.gz as a URL, DNS name resolution fails giving you the error that you're encountering.
I just had the same issue/error when trying to install the econometrics package on a windows install. In my case, for reasons unknown I was getting the following error:
>> pkg install econometrics-1.1.1.tar.gz
error: pkg: failed to read package 'econometrics-1.1.1.tar.gz': Couldn't resolve host name
error: called from
pkg at line 433 column 17
The only way I managed to get it, was by first downloading the package manually into the current working directory of Octave. (See pwd output.) Only then did the install command work.
pkg install econometrics-1.1.1.tar.gz
pkg load econometrics
I recently have this problem, you need to place the file in the Octave directory and from there rigth clik on the file to copy to clipboard and then paste from there.
example:
to me work to change the document to disc D, and then install like:
pkg install symbolic-win-py-bundle-2.9.0.tar.gz

compiler cannot find libvideogfx

I am trying to install libde265 from source but one of its dependencies is giving me problems. I also installed this depedency from source but I converted it to an rpm package before completing installation.
When I look for the location of this library I get:
$ whereis libvideogfx
libvideogfx: /usr/local/lib/libvideogfx.la /usr/local/lib/libvideogfx.a /usr/local/lib/libvideogfx.so
The flags I have added to the ./configure command such as LIBS are not working and I don't know the root of the problem.

Octave imread function

I installed latest Octave on Ubuntu 14.04 machine. However, when I tried to run imread command, it showed the following error message:
octave:12> imread('newfile.png')
error: imread: invalid image file: /usr/lib/x86_64-linux-gnu/octave/3.8.1/oct/x86_64-pc-linux-gnu/__magick_read__.oct: failed to load: /usr/lib/x86_64-linux-gnu/octave/3.8.1/oct/x86_64-pc-linux-gnu/__magick_read__.oct: undefined symbol: _ZN6Magick5ColorC1Ehhh
error: called from:
error: /usr/share/octave/3.8.1/m/image/private/__imread__.m at line 181, column 7
error: /usr/share/octave/3.8.1/m/image/private/imageIO.m at line 66, column 26
error: /usr/share/octave/3.8.1/m/image/imread.m at line 107, column 30
Can someone please suggest how to solve it?
Thanks!
Following these steps worked for me [Author: Christoffer Cronström (hymyly)]:
Install the dev packages needed to build octave.
sudo apt-get build-dep octave
Get the official source package. Do this in a clean directory, because it will get polluted.
cd ~/some/suitable/directory
apt-get source octave
Build it. This took roughly an hour for me.
cd octave-3.8.2
dpkg-buildpackage
Either run it from the build directory:
./run-octave
...or most preferably install it over the official octave:
cd ..
sudo dpkg --install octave_3.8.2-4_amd64.deb
From: https://bugs.launchpad.net/ubuntu/+source/octave/+bug/1372202
How did you instal Octave? The error suggests that you're missing GraphicsMagick C++ interface (package libgraphicsmagick++3) but
if you installed Octave from Ubuntu's package manager you should not have had this problem; * if you compiled it yourself, Octave should have disabled imread completely and you'd have a very different error message.
So my guess is that you build it yourself, either with:
your own build of GraphicsMagick++ which are not being loaded anymore, you may need to add their path to the dynamic linker load path (either on /etc/ld.so.conf.d./graphicsmagick or define LD_LIBRARY_PATH);
the libraries from the package manager which you have since accidentally removed (since you did not install Octave from the repositories, your package manager will not know that libgraphicsmagick++ is installed for a reason).
Either way, the solution is easy. Install Octave from Ubuntu's package manager. One of the main reasons package managers exist is to avoid this type of problems, i.e., missing dependencies.

Perl and DBD::mysql Can't load mysql.so... Perhaps a required shared library or dll isn't installed where expected

Running this code on a shared host with a locally installed perl and modules which were installed via perlbrew. It worked fine for several weeks. One day, it started dying with this output:
/home/xxxx/perl5/perlbrew/perls/perl-5.16.2/bin/perl tweet.pl
install_driver(mysql) failed: Can't load '/home/xxxx/perl5/perlbrew/perls/perl-5.16.2/lib/site_perl/5.16.2/x86_64-linux/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.15: cannot open shared object file: No such file or directory at /home/xxxx/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.2/x86_64-linux/DynaLoader.pm line 190.
at (eval 27) line 3.
Compilation failed in require at (eval 27) line 3.
Perhaps a required shared library or dll isn't installed where expected
at subroutines.pm line 3.
The code hasn't changed. The way I run the script hasn't changed, either. Since I am running this one a shared host, I have no idea what might have been updated or changed on the server, but perl is installed to my home directory, as are all the modules I am using.
It looks like a problem with libmysqlclient. What distribution are you running?
If you are running Debian(based), try "sudo apt-get purge libmysqlclient libmysqlclient-dev" and then "sudo apt-get install libmysqlclient libmysqlclient-dev".