So i am new to arch linux and i am following a guide to get KDE plasma installed, so i've go going along through this script and now all of a sudden i get the following error:
Archlinux ARM: Error: failed to init transaction (unable to lock database)
error: could not lock database: read-only file system
and the command i am using is:
pacman -S kf5 kf5-aids
Now from the fact that i know how to read i see that the second error states that all files are currently read only. What i want to know is how or what would have caused that to happen and how to fix my all round issue.
Do you have root privileges?
Try sudoing:
# sudo pacman -S kf5 kf5-aids
If you haven't installed (and configured) sudo, just log in as root:
# su -
And execute the command under the new user.
Related
I've been developing an Electron app for Linux. The problem is: I can't execute an instruction because of this:
Error: socket: Operation not permitted
This might mean it needs sudo permissions. But since it is a desktop app, and I want to avoid this when I'll distribute it, is there a way to bypass this error, to execute it without sudo or automatically use it, in both development and production mode? If not, can I write a message which says it requires admin execution when I open its AppImage?
#crimson589
If I run dev mode with sudo npm run electron:serve it returns Error: Failed to get 'appData' path. If I run the AppImage with sudo, it works.
I have a library that told me that my Python3.5 provided by my google cloud hosted virtual machine wassn't sufficient:
(scr_env) mikempc3#instance-1:~/scrapy-scraper$ scrapy crawl nosetime -a /pinpai/2-a.html
/home/mikempc3/scrapy-scraper/scr_env/lib/python3.5/site-packages/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
from cryptography import x509
Usage
=====
scrapy crawl [options] <spider>
crawl: error: Invalid -a value, use -a NAME=VALUE
So I downloaded Python3.6.5 because it worked locally for the project I'm doing but I'm not yet able to use the virtual environment I created, necessary to run my scrapy scraper.
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ virtualenv -p /tmp/Python36/Python-3.6.5 scr_env36
RuntimeError: failed to query /tmp/Python36/Python-3.6.5 with code 13 err: 'Permission denied'
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ sudo virtualenv -p /tmp/Python36/Python-3.6.5 scr_env36
RuntimeError: failed to query /tmp/Python36/Python-3.6.5 with code 13 err: 'Permission denied'
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ virtualenv mypython
created virtual environment CPython3.6.5.final.0-64 in 833ms
creator CPython3Posix(dest=/home/mikempc3/scrapy-scraper/nosetime_scraper/mypython, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mikempc3/.local/share/virtualenv)
added seed packages: pip==20.2.4, setuptools==50.3.2, wheel==0.35.1
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
^C
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ virtualenv tes_env
created virtual environment CPython3.6.5.final.0-64 in 161ms
creator CPython3Posix(dest=/home/mikempc3/scrapy-scraper/nosetime_scraper/tes_env, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mikempc3/.local/share/virtualenv)
added seed packages: pip==20.2.4, setuptools==50.3.2, wheel==0.35.1
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ tes_env/bin/activate
-bash: tes_env/bin/activate: Permission denied
mikempc3#instance-1:~/scrapy-scraper/nosetime_scraper$ sudo tes_env/bin/activate
sudo: tes_env/bin/activate: command not found
So how can I use the virtual environement created by my downloaded Python3.6
The first problem is yet only a warning. But it would be useful to upgrade your python. Python is a so wonderful technology, that you only command a pip upgrade and everything will be done, automatically to the latest stable, with each other compatible versions, and everything will run seamlessly; you can even upgrade python 2.6 to 3.9 without any problem. (irony)
It is very unlikely that it would be caused by some virtualization thingy. Upgrade your python. Activate should not be called so.
The activate script can not be called in this way. The correct call is
. x/bin/activate
and not x/bin/active. The difference is that the correct version commands your current shell to execute the commands/settings in x/bin/activate. The bad version (without the . prefix) starts a new shell, whose only task is to execute x/bin/activate as a script.
For the second, you need both read and execution access. For the first, you only need read access. This activate script, probably exactly on this reason, has no execution flag.
If a file has no execution flag, not even the root can execute it (but he can give +x for it on need). This is why it still did not work, even with sudo. (After a chmod +x tes_env/bin/activate, it had worked but the settings where applied in a subshell which exits after the command is run, so it had not done anything.)
When I execute
sudo apt-get install composer
Following error occurred:
sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy'
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
and don't know the root password. Please suggest me a solution
Your system is broken. Unless you changed the permission specifically on that file, there's a good chance other files are also affected by the same issue.
If it's just this file for some reason, you can boot from a live CD, mount your root filesystem, and run chmod 0600 /path/to/usr/lib/sudo/sudoers.so.
Otherwise, either you or something you used ran chmod 0777 on your /usr or other directory when it should never happen. Realistically, your best option in this case if to backup your data, reinstall the system and restore. You could attempt recovery, but since you posted this question, it's probably too advanced.
I was working with markdown file on RStudio. I have Ubuntu 14.04 on my laptop. I produce html files using knitr. I decided to clean my enviroment and added rm and gc commands at the end.
Now here is a message in my console window:
Error attempting to read history from ~/.Rhistory: permission denied (is the .Rhistory file owned by root?)
What it means? Is it bad for my code?
You are right - the first time you ran it, you were in sudo mode, and the .Rhistory file was created with root as the owner. Running RStudio as root would remove the symptom, but is not ideal. To be able to run it as a regular user, simply change the owner of the .Rhistory file:
sudo chown -c <user_name> .Rhistory
In the best traditions of stackoverflow I reply to my own question! The problem occurred because when I first started R, I did it as su:
sudo R
so I can load a lot of useful libraries in /usr/lib/R/site-library and not in my account. As result .Rhistory became su file. It is possible for RStudio to see it if it is started as
sudo rstudio
and then all is fine.
I seem to have broken my update system on OpenSuSe 12.3. Whenever I try to update I get this message:
( 1/23) Installing: libsolv-tools-0.3.2-2.14.1 .....................................[error]
Installation of libsolv-tools-0.3.2-2.14.1 failed:
(with --nodeps --force) Error: Subprocess failed. Error: RPM failed: error: unpacking of archive failed on file /usr/bin/dumpsolv: cpio: rename failed - Input/output error
error: libsolv-tools-0.3.2-2.14.1.x86_64: install failed
error: libsolv-tools-0.3.2-2.10.1.x86_64: erase skipped
Abort, retry, ignore? [a/r/i] (a):
When looking at for program dumpsolv in /usr/bin, I get this:
# ls | grep "dumpsolv"
dumpsolv
dumpsolv;528134c9
dumpsolv;528134d2
dumpsolv;528134da
dumpsolv;528134ec
dumpsolv;5281350e
dumpsolv;52813523
dumpsolv;52828c89
dumpsolv;52880d1a
dumpsolv;52880d44...
followed by many more lines like this. One for every failed installation of libsolv-tools-0.3.2-2.14.1
When looking at dumpsolv I get these errors:
# stat /usr/bin/dumpsolv
stat: cannot stat ‘/usr/bin/dumpsolv’: Input/output error
and (of cause)
# lsattr /usr/bin/dumpsolv
lsattr: Input/output error while trying to stat /usr/bin/dumpsolv
I already tried out the following commands:
zypper ve
rpm --rebuilddb
And this:
https://joshua.hoblitt.com/rtfm/2013/05/dealing_with_rpm_cpio_rename_package_installupdate_errors/
Here is the tool that is causing the update issue:
http://rpmfind.net//linux/RPM/opensuse/updates/12.3/x86_64/libsolv-tools-0.3.2-2.14.1.x86_64.html
And my uname
# uname -a
Linux linux-3hbw.site 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64 x86_64 x86_64 GNU/Linux
I am really at a loss here. I already posted in there forums, but without any luck, they seem to be as puzzled as I am:
http://www.opensuse-forum.de/update-error-f%C3%BCr-opensuse-12-3-f%C3%BCr-libsolv-tools-0-3-2-2-14-1-software-installieren-aktualisieren/allgemeines-f17/t9540-f55/
http://www.unixboard.de/vb3/showthread.php?54758-Update-error-f%FCr-OpenSuse-12-3-f%FCr-quot-libsolv-tools-0-3-2-2-14-1-quot
Also, I cannot reinstall the currently installed libsolv-tools, as I get the same error that I get when trying to upgrade.
Ok, I fixed it, It was a problem with my file-system. Here is what I did:
First I saw that stat returned an input/output error. That seemed strange to me, so I checked the whole directory:
# stat /usr/bin/* | grep "Input/output error"
And got a whole list of errors. Thus I knew that it was not a problem with dumpsolv, but rather something with a bit more impact. This lead me to search the web and I found out that it could in fact be an error in the file-system.
To repair the root file-system in OpenSuse they offer some really great advice:
http://www.novell.com/documentation/suse91/suselinux-adminguide/html/ch12s05.html
Thus I booted up the installation-DVD, canceled the installation to get my command-prompt as root and used e2fsck on my root partition, which is /dev/sdb1 like so:
# e2fsck /dev/sdb1
After this I got a really long list of different inode errors, which I read carefully and fixed whatever could be fixed (which was everything, I guess). After this I rebooted my system from harddrive and the problem was solved. I can install my updates and everything is running fine now.
But if you try this: be extremely careful! You are messing with your root partition here and you should read everything it tells you and verify it. Best have a second computer running to check in case you are not sure about something. If you get a bad superblock (which I did not have) you can use dumpe2fs <partition> in order to see which block it is and then use e2fsck -b <block> <partition> to restore the file-system from backup.
Everything is explained well in the link I posted above plus there are a lot of websites on the internet containing information about the use of e2fsck and dumpe2fs, you should consult these first if you have any doubts.
I do hope that this can help someone else.