Linux- error while running executable files - linux

I am trying to run an executable file on newly installed Ubuntu and I am getting the following error:
>./hadoop
hadoop : Not a directoryh
>hadoop
hadoop command not found
Can anyone help me with it?

On Ubuntu you can try pre-packaged Cloudera's distribution. Works very well for me.
Add repositories for your version of Ubuntu, create user 'hadoop' (no root required to access configuration files)

This answer very conditional, but it might be the problem.
If you're running this on a 64-bit ubuntu, you're OS might not have the 32-bit linker libraries. To install them, run the following command:
sudo apt-get install ia32-libs
If it was the problem, it should work.

You need to make it executable first
chmod 777 ./hadoop
./hadoop

Related

missing libmpfr.so.6 when using a cross-compiler

I am using Ubuntu 18.04
I built a mips cross-compiler using buildroot, but when I tried to test whether it would work,I got this message
/home/daisy/repos/repo/buildroot/output/host/bin/../libexec/gcc/mipsel-buildroot-linux-uclibc/9.3.0/cc1: error while loading shared libraries: libmpfr.so.6: cannot open shared object file: No such file or directory
I searched for solutions , one of which said this:
sudo pacman -S mpfr
Well , my Linux isn't archlinux, this didn't work for me.
somebody please tells me how to deal with it.
The above suggestions of installing libmpfr on your host system are wrong. Buildroot is supposed to have build libmpfr, it should be present in host/lib, and picked up by the cross-compiler by virtue of it having a proper RPATH. If it doesn't work, we need to figure out why, but the correct thing is not to install libmpfr on your host system.
In Ubuntu, apt command (Advanced Packaging Tool) is used for performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.
Try this command :-
sudo apt-get update
sudo apt install libmpfr6
This will install shared libraries: libmpfr.so.6 to your Ubuntu system.
Hope It Helps !

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

How to get latest cmake version from CentOS 6.5

Is there a good way to install latest cmake version from CentOS 6.5?
I'm doing yum install cmake but it's giving me 2.6.4 from base repo which I don't want.
I tried installing cmake28 but the problem is that when I try to do ./configure it throws an error saying cmake is not available.
rpm -Uv ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/Application:/Geo/CentOS_6/x86_64/cmake-3.0.0-143.1.x86_64.rpm
Hope this helps to somebody. If you have any problems with it let me know. Have fun.
I know this is an ancient question, but I got here by google searching and wanted to share what I knew so far.
when you sudo yum install cmake28, you get a /usr/bin/cmake28 binary on your machine. You can setup a symlink to make your configure script work via the following:
sudo ln -s /usr/bin/cmake28 /usr/bin/cmake
Not sure why the cmake28 package doesn't do this for you.
Well, after looking at the tutorial CMake gives on their website, it says download this and after that you have too type "./bootstrap" followed by "make" and "make install".
If you get any errors type "sudo" in front of all the said commands. If that doesn't work, your best bet would be too login to the root account by typing "su" and the root password following that.
If you already have cmake installed you should either follow the steps cmake offers on their website or try the command "sudo yum remove cmake".

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

I am trying to install roccc 2.0. I have installed required packages. Now while installing it, it is giving me this error:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
I searched for gnu/stubs-32.h and came to know, for Linux 64-bit its in glibc-devel and for Linux 32-bit, its in libc6-dev-i386.
I am using Linux 32-bit: i386 GNU/Linux, but couldn't get the lib required to resolve this error.
Can somebody please help me out?
If your Linux distro is Redhat based (Fedora/CentOS/RHEL):
yum install glibc-devel.i686
References
Original post answer solved this problem RHEL x64
Header file gnu/stubs-32.h is under /usr/include/i386-linux-gnu/ but the install script tries to find it in /usr/include/, try this quick fix to complete the installation:
sudo ln -s /usr/include/i386-linux-gnu/gnu/stubs-32.h /usr/include/gnu/stubs-32.h
After installation is finished, you can delete the link.
The package name keeps on changing, just do a
yum list glibc-devel
to find out current package for 32 bit. In my case it only listed 2 packages one for 32 bit and one for 64 bit. I just installed the 32 bit using
yum install glibc-devel.i686
Install 'glibc-devel' package, or whatever it called in your distro. You may also need to install ia32-libs lib32z1-dev lib32bz2-dev (names could be different in your distro).
The script is trying to get stubs-32.h from /usr/include/ where it is not found. To solve this you have to add an "include" path (by default it is /usr/include) like this:
C_INCLUDE_PATH=/usr/include/i386-linux-gnu/
export C_INCLUDE_PATH
OR
export C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)
You can visit Error "gnu/stubs-32.h: No such file or directory" while compiling Nachos source code for additional reference.
If on a Red Hat distro such as Fedora/CentOS/RHEL you can do the following to find out what package provides a given file:
$ repoquery -qf */stubs-32.h
glibc-devel-0:2.17-260.el7.i686
And then install it:
$ sudo yum install -y glibc-devel-0:2.17-260.el7.i686

installing node.js on dedicated server

ok so I got a dedicated linux server and I'm trying to install node.js
i ran
wget http://nodejs.org/dist/node-v0.4.11.tar.gz
tar zxf node-v0.4.11.tar.gz
cd node-v0.4.11
all is well
then i ran
./configure
and i got
Checking for program g++ or c++ : not found
Checking for program icpc : not found
Checking for program c++ : not found
wscript:232: error: could not configure a cxx compiler!
so i google that error if found a page that says run this
sudo apt-get install build-essential libssl-dev curl git-core
but then i get
-bash: sudo: command not found
please help me I don't know what to do now
If you are running some debian based distro, that code should work. Since you are running CentOS, you can follow this link. Different linux distros use different package managers. It looks like that debian is the most popular (ubuntu, mint, debian...) so many online tutorials you find use apt to get everything installed. Your choice is different and you should use rpm/yum. Since you are missing gcc compiler, you should try executing this command (you should probably add some more packages, not sure):
yum install sudo gcc-c++
EDIT: Updated link to serverfault.com
Actually the error output tells you exactly what's missing: sudo. Quick Googl'ing should reveal what this tools meaning is: It lets you execute commands with root privileges, provided you have access to a user account that's privileged enough to use this functionality.
So you need root privileges to install packages. This is not surprising. If sudo is not installed, you most probably either
are logged in as root, in which you can use apt-get without the sudo in front
are not logged in as root and thus don't have the necessary permissions to install packages. In that case, you are unlucky and you need to talk to the administrator.
UPDATE: From your comment to the other answer I take it that you are running with user privileges and do not have su in your PATH. Do you know the root password? If yes, you can try if /bin/su works. If no, you don't have enough privileges.

Resources