/usr/bin/wish:don't have that file or directory - linux

I have a browse.tcl script, when I exec it, the Ubuntu shows :
"bash: ./browse.tcl:/usr/bin/wish:don't have that file or directory"
I tried to find the "wish"
usr/bin$ find wish
find: ‘wish’: don't have that file or directory
How can I get it?

It is not part of the default distribution package. In order to install it just do:
apt-get install wish

WISH is TCL's WIndowsing Shell. On Ubuntu you can install it with apt-get install wish.

Related

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.

how to install a .rpm file on Intel Edison?

Hi I am new to Linux and I am trying to install a .rpm file on an Intel Edison but I can't find a way to install it, I have tried:
rpm -i filename.rpm
With this command I get the error "Failed dependencies: /bin/bash is needed", "/bin/sh is needed" and some more, both of thise files exist. This is also the result with all other commands that tries to install the file.
further information the Linux is based on Yocto, and from what I understand there is no command like "apt-get".
So my question is, how to install a .rpm file on an Intel Edison?
Although I have only worked with Galileo, they share a lot of tricks with the Edison family of boards:
To install additional packages (a la apt-get), try the opkg command. If not available, try updating your system image.
If you do have bash and or sh, symlink them to the needed folder:
$ which bash will give you the location of bash, /usr/bin/bash, for example.
Take that folder, and add a symlink: ln -s /usr/bin/bash /bin/bash. Remember to replace /usr/bin/bash with the output of the previous command.
Edison is dual core atom, I would suggest you to put CentOS on it and then try to install a rpm on it.

Problems installing Pycharm

I am trying to install pycharm on my linux OS.
following the instructions pycharm/dowload.
Since I run a linux machine I made sure the pychrarm files in the current directory:
ietX220:~$ ls
Desktop pycharm-community-4.0.1
Documents Music
pycharm-community- 4.0.1.tar.gz
Downloads New Folder Templates
Dropbox octave-workspace Videos
examples.desktop Pictures VirtualBox VMs
jdk1.8.0_25 Public Win7-PV2hh-6c3HY-
QJHM9-8RJJH-P86W8.iso
ietX220:~$ pycharm-*.tar.gz
pycharm-community-4.0.1.tar.gz: command not found
As you can see the pycharm file is in the current(home) directory but is not found.
Then I opened the tar file made pycharm.sh executable:
chmod +x pycharm.sh
And then ran:
~/pycharm-community-4.0.1/bin$ ./pycharm.sh
Startup Error: Application cannot start in headless mode
What am I doing wrong?
I am having the same issue. It looks like maybe you and I both have a minimal (headless) Java install on our systems. Use your system's method for finding installed packages and search for Java, and i'll bet you find only openjdk-headless
yum list installed | grep openjdk
# or on debian-based systems
# dpkg --get-selections | grep openjdk
# =>java-1.7.0-openjdk-headless
Solution then is to install the same package without the "-headless" suffix.
Here's where I am getting my information for the solution: https://bugzilla.redhat.com/show_bug.cgi?id=1177379
I had the same problem and as mentioned before the error was that openjdk was headless. What i did is i installed from the begining openjdk using the command apt-get install default-jdk (for ubuntu). I know it's not the best way to do it, however it is rather quick and simple.
If you have already all the prerequisites (such as Java) installed, try out charmy (PyCharm installer for Linux).
virtualenv charmy-env
source charmy-env/bin/activate
pip install charmy
charmy install
That will install PyCharm into your home directory. It will also simplify your feature PyCharm upgrades. To upgrade you would just have to type
charmy install
instead of downloading distribution manually, unpacking it, etc.
See https://pypi.python.org/pypi/charmy for more.
PYcharm is now available as a snap. Can be easily installed as below
sudo apt update && sudo apt install snapd
Then the community edition can be installed by
sudo snap install pycharm-community --classic
The classic escape is to get snaps that have been published with classic confinements
220:~$ pycharm-*.tar.gz
pycharm-community-4.0.1.tar.gz: command not found
gz files are not executable files. I think the current directory is not in your PATH variable. To get around that you would do "./pycharm-community-3.0.1.tar.gz" and you should see the message "Permission denied" as the gz file would not have execute permission. And if you gave it execute permission it would say "cannot execute binary file: Exec format error".
These are the instructions from the JetBrains website:
Copy the pycharm-*.tar.gz to the desired installation location
(make sure you have rw permissions for that directory)
Unpack the pycharm-*.tar.gz using the following command:
tar xfz pycharm-*.tar.gz
Remove the pycharm-*.tar.gz to save disk space (optional)
Run pycharm.sh from the bin subdirectory
NOTE: PyCharm on Linux doesn't need special installation or running
any installation script. It runs out of the pycharm-*.tar.gz
If you run the command "tar xfz pycharm-*.tar.gz" you should end up with a directory in your current directory named "pycharm-community-4.0.3".
If you cd pycharm-community-4.0.3/bin, "ls -al" should show that pycharm.sh is already executable. Run pycharm.sh and you should be done. The script will prompt for a password at the end so it can put a startup script in a system directory. You must have admin privileges for that part to work. But if you don't, you can still start PyCharm by executing "[path to pycharm directory]/bin/pycharm.sh &" at the command prompt.
I am not sure what the "NOTE:" is saying, but I would ignore it as you get a working PyCharm by doing what it says above the NOTE: .
Setup the newest stable jdk(like jdk1.7 or jdk 1.8) in your system, and set it is the default jdk.
1.download JDK8
2.SET JAVA HOME
sudo gedit /etc/environment
export JAVA_HOME=/home/username/Java/jdk1.8
export JRE_HOME=/home/username/Java/jdk1.8
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
sudo gedit /etc/profile
//before umask xxx adde
export JAVA_HOME=/home/username/Java/jdk1.8
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$JAVA_HOME/bin
3. run pycharm
./pycharm.sh

Installing Issue in the Debian-Linux Server

I am trying to install Kyoto Cabinet in the Debian-Linux Server by using this commands. However, when I execute
./configure
Command, it gives error
-bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
Can anybody help me why is this happening and how to solve this issue ? Or any idea why this error can happen ?
Because of the ^M character, the configure file is probably using Windows-style line endings.
Try to convert it to use UNIX-style:
dos2unix configure
or in vi type:
:set fileformat=unix
than save the script and try again.
kyotocabinet is now packaged in debian sid
apt-get install libkyotocabinet-dev --install-suggests
you may need to add this to /etc/apt/sources.list
deb http://cdn.debian.net/debian sid main
For me, an initial installation of Kyoto Cabinet (K.C.) was unsuccessful because C++ and zlib were missing from minimal Centos 6. Eventually, these omissions were discovered and K.C. installed (initial instructions from http://skipperkongen.dk/2013/02/14/giving-kyotocabinet-a-go/):
yum -y install gcc-c++
yum -y install zlib-devel
wget http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.76.tar.gz
tar xzvf kyotocabinet-1.2.76.tar.gz
cd kyotocabinet-1.2.76
./configure && make && make install # takes some time!
Test Kyoto Cabinet with:
kcprototest wicked 5
To install the Kyoto Cabinet API for Python (initial instructions from others):
Test Kyoto Cabinet with:
kcprototest wicked 5
As root, of course:
cd $HOME
yum -y install python-devel
wget http://fallabs.com/kyotocabinet/pythonlegacypkg/kyotocabinet-python-legacy-1.18.tar.gz
tar xzvf kyotocabinet-python-legacy-1.18.tar.gz
cd kyotocabinet-python-legacy-1.18
python setup.py install # may take some time!
Create and run a test program, e.g., testkc.py, from the Kyoto Cabint web site.
It should run OK.
You probably want to make K.C. available outside root. Create a new file:
vi /etc/ld.so.conf.d/usrlocal.conf
and add the line:
/usr/local/lib
Then run
ldconfig -v
Move the testkc.py to a user account and run it there; it should be OK

How to create terminal commands for programs installed from source

I recently tried to install monit on Ubuntu Natty from source. Here's my code:
apt-get -y install openssl libssl-dev bison flex
mkdir src && cd src
wget http://mmonit.com/monit/dist/monit-5.3.2.tar.gz
tar xzf monit-5.3.2.tar.gz
cd monit-5.3.2
./configure --prefix=/usr/local/monit
make && make install
However, when I install Monit using apt-get I am able to call monit directly from the command line using the keyword monit. I am not able to do so when I do the install from source. The same goes for PHP.
How can I enable this feature for when I install Monit (and other Linux programs) from source?
Thanks in advance.
EDIT
I was able to solve this by doing the following:
printf "\nPATH=/usr/local/monit/bin:\${PATH}\n" >> ~/.profile
source ~/.profile
This will apply for the currently logged in user (in my case root). To make it system-wide simply replace ~/.profile with /etc/profile.
So now I can can call monit (and any other program I install from source).
Using that command to install it will put it in /usr/local/monit, which won't be in your $PATH, as others have said. There are several options besides modifying your path, though. For instance, you can create a symbolic link from the real executable to one in your path. So if the executable is /usr/local/monit/monit, you can
ln -s /usr/local/monit/monit /usr/local/bin/monit
The advantage of creating the symbolic link is it will work for all users.
You can also create an alias, but that would only work for apps that run as you.
Edit your /etc/profile to add the path /usr/local/monit to the PATH variable.
For ex, if you earlier had this.
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
You could change it to
PATH="/usr/local/monit:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"

Resources