Error after installing packages with snap - linux

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

Related

How would you properly install MATLAB in ubuntu that is running on WSL2?

I want to install matlab in ubuntu 20.04, but I'm running ubuntu in WSL2 and it doesn't want to work.
I keep getting the error: terminate called after throwing an instance of 'framework::window::DisplayError what(): No. Display Avaliable.
I have the linux version of matlab unzipped in a folwer and I'm trying to instal it into the user files. Things I've tried to install it that were suggested for people having the same issue on other distros:
sudo ./install
./install
bash install
install
bash ./install
sudo bash ./install
sudo su and then doing ./install
export DISPLAY=:0.0 and then sudo ./install
bash ./install -v -inputFile installer_input.txt
It gives the same error for every one that I've tried.
Let me know if anyone has any solutions. Thanks.
Posting this to help out others in the future. It actually involved a few things to get this fully working properly:
1)Had to get a X Server
2)Had to change display settings in ubuntu to get it to recognize the X server and turn off some firewall features for Windows.
3)Had to when installing matlab install using the legacy install file instead of the normal install file

Getting an error by making VBox full screen on Windows?

Despite installation of the package, getting same error again.
Error : kernel module failed
Kernel headers not found for target kernel4.19.0-8-amd64. Please install them and execute
Host: Win 10
VBox: Debian 10
This is typical issue, actually not an issue simply missing headers. Run following
commands
$ sudo apt install linux-headers-4.19.0-8-amd64
$ sudo apt install dkms
Then run guest script again
sudo sh VBoxLinuxAdditions.run
Finally reboot the machine
$ sudo reboot

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.

VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005) with meanjs and vagrant

I am trying to run mean.js project based on vagrant , but I get the following error with the vagrant up command on ubuntu 14.04 LTS 64 bit.
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "d660b7d6-06a3-49bc-8b90-cbad92632c11", "--type", "headless"]
Stderr: VBoxManage: error: The virtual machine 'pets_default_1473142645576_38190' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
I solved the using following steps:
I have completely remove older VirtualBox versions before installing VirtualBox-5.0 !
Uninstall VirtualBox
sudo apt-get purge "^virtualbox-.*"
Update the software repositories
sudo apt-get update
Clean up
sudo apt-get autoremove | sudo apt-get autoclean | sudo apt-get clean
Setup API repository (For Ubuntu 14.04 ("Trusty"))
echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" | sudo tee /etc/apt/sources.list.d/oracle-vbox.list
Setup Oracle Key
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
6.Install Oracle Virtualbox
sudo apt-get update
sudo apt-get install virtualbox-5.1
Start Virtualbox
virtualbox
For more help check to here.
I have reinstalled virtual box and the issue has been solved for me.
On my mac while installing virtual box, It has not allowed me to install. So i went system preference -> security & privacy - > general - 'allow apps download from' -> click on the "allow" button.
I have successfully installed virtual box after the above changes on system preference.
Kitchen converge -> successfully done.
I was using macOS and I had this error after updating VirtualBox. I solved the error by going to:
System Preferences --> Security & Privacy and then clicked on lock to make changes. Then, I clicked on "Allow" as shown in the picture below:
After you make the changes, a restart is requested by the system, after restart the command should work just ok :)
Move to directory:
cd /sbin/
Run script:
sudo ./vboxconfig
Start VM:
VBoxManage startvm "VM name" --type headless
It works:)
Root this problem - system updating. VBox updated partially. This script fix this problem.
For some reason my virtualbox linux host was having an outdated vboxdrv kernel module.
I did the whole remove VirtualBox package, then reinstall, but this old version kernel module remained.
Manually deleted the unwanted module, then freshly reinstalled latest VirtualBox, then usual vboxconfig to rebuild the latest modules, and we're done.
/usr/bin/vboxmanage startvm Win10-Server --type headless now working as expected. :-)
I also faced the same issue, but Santosh Shinde's answer helped me to figure it out.
I, however, want to add to it:
After uninstalling every old/previous version of Virtualbox available on your PC:
sudo apt-get purge "^virtualbox-.*"
And cleaning your system:
sudo apt-get autoremove
Rather than installing Virtualbox from the Apt repository of Ubuntu, simply visit the downloads page of Virtualbox, to download the most current version of Virtualbox.
This is because the Apt repository may not have the latest version of Virtualbox.
I have the same error after install some cripto plugin to Chrome.Then see that Virtual box extension is not working under root and user. In my linux distributive /opt owner was changed to user by cripto plugin installator. Changing /optto root owner has solved the problem.
I just had this happen on a FreeBSD box where vagrant wasn't involved at all.
[root#freebsdserver ~]# vboxmanage startvm yavm
Waiting for VM "yavm" to power on...
VBoxManage: error: The virtual machine 'yavm' has terminated unexpectedly during startup because of signal 6
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
In this case it's because "freebsdserver" is running headless. The fix was to run:
# vboxmanage startvm yavm --type headless

Installing beanstalkd on a shared hosting account at Godaddy

I am trying to install beanstalkd (http://kr.github.io/beanstalkd/download.html) via the Linux Terminal on a shared hosting account at Godaddy.
The previous link gives commands that should install beanstalkd on the server. I use SSH (with PuTTy) to access the Linux Terminal. I have practically tried all the commands in the previous link and am consistently obtaining errors like:
sudo apt-get install beanstalkd
error message: -bash: sudo: command not found
brew install beanstalkd
error message: -bash: brew: command not found
su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'
su -c 'yum install beanstalkd --enablerepo=epel-testing'
error message: -bash: su: command not found
yaourt -S beanstalkd
error message: -bash: yaourt: command not found
I am not even sure what bash is exactly and if it is causing the problem, or if its because I'm using an SSH connection, or if it's really because the commands don't actually exist on the server (which would be strange because when I do man sudo or man su I do in fact get the complete manual of both commands in the terminal).
QUESTION: Why am I unable to run the previous commands to install beanstalkd on the linux server? Does it have to do with me using PuTTy (ssh connection)? What could I possibly do to get beanstalkd installed? Could it be because its shared hosting with Godaddy, and I might not have full power over the linux terminal?
SERVER INFO: When running cat /proc/version I obtain my linux distribution: Red Hat 4.4.7-16. I have a shared hosting account with Godaddy with a linux server hosting my site.
You have a RedHat distro, and they use rpm+yum for package management.
I see from yum search beanstalkd on my box that I can find it, but only on EPEL.
However, you have a really old version of RedHat, so can't just install the epel-release rpm, also, there doesn't seem to be a built version for RedHat 4.
If you had at least RedHat 5 you could do:
$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
$ sudo yum install beanstalkd
You may in fact have a restricted instance of batch...
You must go to your provider's interface and do the necessary to have root access. Have you tried something like explained here?
https://uk.godaddy.com/help/enable-adminroot-access-managed-or-fully-managed-12270
If it doesn't work for you, you may also try asking https://serverfault.com/ that seems more relevant for your case.

Resources