Permission denied - Static Lxml Build Failed - Plone - CentOS - linux

I am using the Unified Installer for Plone 5.0 on CentOS server.
./install.sh zeo --target="${HOME}/plone" --static-lxml --build-python
CentOS has an older version of lxml2 library so I have to build static lxml & Python. Error is as follows:
lxml: Static build requested.
Installing lxml.
lxml: CMMI libxml2 ...
lxml: Using libxml2 download url ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz
libxml2: Downloading ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz
libxml2: Unpacking and configuring
sh: ./configure: Permission denied
libxml2: cmmi failed: /tmp/tmpAyLWxdbuildout-libxml2
While:
Installing lxml.
Error says "Permission denied", so I tried installing with sudo and logging in as root. Also changed permissions of /tmp to 777. Any suggestions are appreciated.

You are trying to reach read/write permission for root user. You can simply change your user to root.
$ su -
Or if your user is in sudoers group you can use;
$ sudo ./install.sh ....
You can check if your user is in sudoers group or not with
root$ cat /etc/sudoers

Figured it out. The installer was running a script in /tmp which was set to non-executable. Remount /tmp as executable and it works fine.

Related

Installing GCC?

I am trying to install GCC (most importantly, the g++ compiler) on an Ubuntu machine where I don't have 1) sudo permissions or 2) apt access (any apt command gives the error Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)).
I was able to successfully make the uncompressed archive that I downloaded from an official GNU GCC mirror site, but make install failed with the following error:
mkdir: cannot create directory ‘/usr/libexec’: Permission denied
Makefile:181: recipe for target 'install' failed
Any ideas for how to get a copy of g++ 6.0 or higher? Is there a pre-compiled binary I can download from anywhere?. I also don't have a user interface (this is a remote machine I am SSHing into), so a direct link to a file would be greatly appreciated.

Permission denied while trying install vue/cli on ubuntu 20.04

I'm trying to install Vue CLI on ubuntu 20.04 with the following command:
sudo npm install -g #vue/cli
I got permission denied error
2021/06/13 14:35:24.163955 cmd_run.go:1002: WARNING: cannot create user data directory: cannot create "/nonexistent/snap/node/4749": mkdir /nonexistent: permission denied
I used the following code to solve the permission denied problem in the directory that I'm developing the project but the solution did not solve the problem
chmod -R 777 /Desktop/vuejs
I founded the solution because I installed node js using Snap package from Snap Store, which has different permission caused the problem. installing Vue CLI using npm needed permission for making a directory in the snap directory, even changing permissions to 777 in the snap directory is not a good solution becouse changing file system directories permission like snap or usr hurts your ubuntu operation system, in my case after changing usr and snap directory permission to 777 my root permission gone and I had to reinstall ubuntu operation system
you can install node js version 14.x using apt with the following command
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
also the following link is useful to install other nodejs versions
nodejs debinstall

How to install sshfs without sudo?

I'm trying to build sshfs on a cluster where I don't have root access.
Following these instructions I did:
1) Built and installed ninja and meson
2) Built libfuse with meson --prefix=/cluster/home/user/fuse
The problem comes when trying to install libfuse (ninja install), which requires root credentials. I get the following error:
Running custom install script
'/cluster/home/user/fuse/libfuse/util/install_helper.sh
/cluster/home/user/fuse/etc /cluster/home/user/fuse/bin
/usr/lib/udev/rules.d' chown: changing ownership of
‘/cluster/home/user/fuse/cluster/home/user/fuse/bin/fusermount3’:
Operation not permitted
How can I install libfuse to build sshfs?
fuse simply requires suid. You can't avoid it.
In my case the problem is that fusermount is available but the installed sshfs requires fusermount3. So basically once I compile if I execute ./sshfs remote#remote.com:folder ./mount_here I get the error: fuse: failed to exec fusermount3: No such file or directory
What I have done is (in any folder in your $PATH) create a symbolic link as:
ln -s /usr/bin/fusermount fusermount3
and now my installed sshfs works. By time March 2022.
My problem is the same as the person asking in this post. I run on a cluster and I am not root so no able to install sshfs via apt-get

Error after installing packages with snap

I've used the snap package manager to install packages and I'm always
getting the same error, even with the simple hello world example:
$ sudo snap install hello
$ hello
cannot create user data directory: /home/aaa/snap/hello/20: Bad file descriptor
Running with sudo solves the problem for the hello program, but why do I even need to do sudo?
BTW, for the other packages (Meshlab, CloudCompare) it doesn't work also with sudo and gives different errors. For example:
~$ sudo cloudcompare.ccViewer
mkdir: cannot create directory '/run/user/0': Permission denied
No protocol specified
QXcbConnection: Could not connect to display :0
The snap version and Ubuntu distro are:
$ snap version
snap 2.22.7
snapd 2.22.7
series 16
ubuntu 14.04
kernel 4.4.0-64-generic
Any chance your home directory is an nfs share with no-write-by-root enabled? If so, try logging in as another user that has a local home.
Also, see: https://bugs.launchpad.net/snappy/+bug/1625279

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

Resources