How to install jpegrescan on Centos 6? - linux

Id like to use jpegrescan on my Centos 6 linux install, both on its own and as part of Picopt.
Unfortunately I can't seem to get it work with either. The Picopt instructions just vaguely say it needs to be "in path" though I'm not sure where that is?
I've tried dropping in various places such as /usr/bin /usr/local/bin - but I don't get the jpegrescan command, and nor does picopt find it to use...
Can anyone advise?

After getting the jpegrescan Perl script and making it executable, you also need to install the File::Slurp Perl module like so:
yum install perl-File-Slurp

In Ubuntu, the command needed was:
apt-get -y install libfile-slurp-perl
So complete installation sequence in Ubuntu would be:
sudo apt-get -y install libfile-slurp-perl
sudo wget https://raw.githubusercontent.com/kud/jpegrescan/master/jpegrescan -O /usr/local/bin/jpegrescan
sudo chmod +x /usr/local/bin/jpegrescan

Related

fatal error : aux.h No such file or directory (Ubuntu)

I'm learning how to compile the Linux kernel on Ubuntu. Following step by step, I encountered errors like this. There is no problem until
$ sudo make menuconfig
but sudo make doesn't work. I installed these libs.
sudo apt-get install libncurses5-dev
sudo apt-get install libssl-dev
sudo apt-get install libelf-dev
sudo apt-get install flex
sudo apt-get install bison
How can I include this header file?
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c:25:10: fatal error: aux.h: No such file or directory
25 | #include "aux.h"
The aux.h file should be in the directory drivers/gpu/drm/nouveau/nvkm/subdev/i2c, you can go to the path to check whether there is the file and if not, you can redownload it.
You said you are using a Virtual Machine, so I assume Windows is your host. Windows doesn't allow files name aux*, but there are ways around it, e.g rename in WSL or cygwin... and perhaps a virtual machine will work too. See here for more information:
https://superuser.com/questions/206423/windows-7-can-not-rename-a-file-to-aux-svg-the-specified-device-name-is-inva

Determine if Chrome is installed on a Linux VM

I am setting up a CI/CD pipeline for an Angular application. Part of this pipeline will run some end-to-end/UI tests, using Protractor and Chrome. The pipeline script is written using Groovy, and the CI/CD software is Jenkins.
Currently, the VM doesn't have Chrome or ChromeDriver installed, and I can't access it over ssh. Further, I'm not entirely sure if the VM is always the same, each time the pipeline is run. So I think the best way to make sure Chrome is installed is to check at the top of the Groovy script, and if it's not, then to install it. I've found these instructions for installing Chrome on a Linux VM:
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get install -f
sudo apt-get install xvfb
sudo apt-get install unzip
wget -N http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
chmod +x chromedriver
sudo mv -f chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
sudo apt-get install python-pip
(source)
But I don't want to have run this every time, as it's likely that Chrome will already be installed. So how would I check in the Groovy script and then only run it if necessary? I'm pretty inexperienced with this stuff (I'm a front-end dev) so if I've made any mistakes or there are better ways to do this, please let me know!
EDIT: would a better way be to install ChromeDriver with npm? Should ChromeDriver be included in the package.json devDependencies?

Can't find Python.h when compiling PyCaffe on Ubuntu 14.04

I'm trying to install PyCaffe for Python 3.5.3 on AWS EC2 with Ubuntu 14.04 without Anaconda, following the installation instructions.
I successfully compiled it on the same machine for Python 2.7 but when compiling for version 3.5 I get the following error:
ubuntu#ip-172-31-3-227:~/caffe$ make pycaffe
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
#include <Python.h> // NOLINT(build/include_alpha)
I saw this post and performed:
sudo apt-get install python3-dev
I found this, so I performed the equivalent command for Python 3.5:
for req in $(cat requirements.txt); do sudo pip3.5 install $req; done
All installations worked but it didn't fix the problem.
I many other posts on similar problems but not this exact problem (so if you find something please check that it's really the same situation before rushing to say I didn't look well enough).
P.S.
I also saw this post but I don't understand which directories to add to the path.
When you do a pip install package,when pip finds new version,it uninstall the current one(dateutil in your case) when the package was installed using certain permission,pip needs the same permission to uninstall/upgrade it.
A quick fix would be to change this
`for req in $(cat requirements.txt); do pip3.5 install $req; done` to
for req in $(cat requirements.txt); do sudo pip3.5 install $req; done
It seems you dont have permission to access /usr/local/lib/python3.5/ folder as user,the packages that goes in /usr/local are required by the system but only available to you and only you on the system, i assume since only only they are restricted to you and pip want to access assuming that no restriction is there,then it get permission denied ,so you might consider doing
for req in $(cat requirements.txt); do pip3.5 --user yourusername install $req; done
the alternative is to remove any restriction to execute and write on that folder
by doing chmod -R 777 /usr/local/lib/python3.5/ which is usually not recommended but the problem you need pip to be able to read,write,execute anything in that folder.

Error with swift command in terminal in ubuntu 15.04

I installed the open sourced version of Swift from swift.org for Ubuntu 15.10, but I am running Ubuntu 15.04 in my machine. Now when I executed the swift command in the terminal it raising the following error.
swift/usr/bin/repl_swift:error while loading shared libraries:
libicuuc.so.55: cannot open shared object file: No such file or
directory
error: failed to stop process at REPL breakpoint
I ran the following command to ensure libicu52 is installed.
sudo apt-get install libicu52
Please help me to sort out this problem.
Thanks in advance.
Try this one
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb
sudo dpkg -i libicu55_55.1-7_amd64.deb
It worked for me
For newer versions where it complains about libicuuc.so.57: cannot open shared object file (version 57), use the following:
sudo wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu57_57.1-6ubuntu0.3_amd64.deb
sudo dpkg -i libicu57_57.1-6ubuntu0.3_amd64.deb
In general, you can search here for the version you need.
I tried this as well
apt-get install libicu-dev
It worked for me
You don't need libicu-dev unless you are building Swift from source. The problem is that, as pointed out by gengisdave, libicu52 is installed on the machine, but libicu55 is required. A few things you might try:
See if apt-get install libicu55 is going to install the needed version.
Install the binary distribution intended for Ubuntu 14.04. That one requires libicu52, which you do have on the system. This may or may not work, and if it does at first, it may break unexpectedly later depending on what you are doing.
This is even worse, but you might try it if you are just experimenting. Use dpkg -L libicu52 to find out where libicuuc.so.52 is located and create a symlink to it, named libicuuc.so.55, in the same directory.
Before the 8th of December this used to work
echo "deb http://security.ubuntu.com/ubuntu xenial-security main" | sudo tee --
append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install libicu55

How do I build/install protobuf 2.4.1 on CentOs (or any LINUX/UNIX system)?

Ok, so I'm kind of a complete foreigner in the UNIX/LINUX land, but I need to install profbuf 2.4.1.
I was following the instructions by doing
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2
tar xfj protobuf-2.4.1.tar.bz2
pushd protobuf-2.4.1
./configure
make
sudo make install
I could only go as far as ./configure'. WHen I tried runningmake`, I got some error saying "No target specified and no makefile found... Stop"
Does anyone know what I might've done wrong?
Thanks!!!
You probably don't have a g++ compiler in your system or your environment variable doesn't contain the path of it. To install one on linux use the following:
yum install gcc-c++
I had met the same question before, and now I've known the reason. It's lack of corresponding library. If you are using redhat, use root permission to enter the two lines of commands:
# yum install glibc-headers
# yum install gcc-c++
If you are using ubuntu,you can enter this:
# sudo apt-get install build-essential
I've solved my question by that way. Wish you luck!

Resources