In thermex on android, an error occurs when executing the command: apt update: - updates

In termux on Android, when executing the command:
apt update,
an error occurs:
some index files failed to download. they have been ignored, or old ones used instead

It's a http caching problem. Just wait for a day and try again.
See
https://github.com/termux/termux-packages/issues/884

Related

Error when opening Google chrome from the terminal

Chrome opens fine but I always get a message. Just installed chrome today.
Here's the message:
[23956:23956:0124/080528.875465:ERROR:sandbox_linux.cc(378)] InitializeSandbox() called with multiple threads in process gpu-process.
[23911:23936:0124/080531.984723:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[23911:23936:0124/080531.984749:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
If you are okay to loose all your chrome settings and data( Hope cloud sync is on), execute below command and try again
rm -rf ~/.config/google-chrome
And launch again, it will solve the issue.
Verified in arch installation, but I believe this issue is generic.
Thanks.

apt upgrade dpkg error wile processing (Segmentation fault)..?

I was updating packages in raspberry pi and when I apt upgraded this error message came out.
dpkg: error processing archive /var/cache/apt/archives/bash_5.1-2+b1_armhf.deb (--unpack): new bash package pre-installation script subprocess was killed by signal (Segmentation fault) update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode Errors were encountered while processing: /var/cache/apt/archives/bash_5.1-2+b1_armhf.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried some error fixing with
dpkg -i --force-overwrite /var/cache/apt/archives/bash_5.1-2+b1_armhf.deb
but I failed.
The bash preinst maintainer script is a compiled program (instead of the usual shell scripts used there), to avoid having to depend on bash being present at all before it as been unpacked for the first time.
In your case it appears that program is segfaulting for some reason, so it's buggy and needs be debugged and tracked down. Your best option is to report this to the distribution you are using, ideally by providing a core file or a backtrace of the segfault.

PM2 keeps getting killed every 90 seconds on centos 8

I just installed CentOS 8 and added nodejs (tried v12 & v14) And then I installed pm2 using npm install pm2#latest (so at the time of posting it uses v4.4.0). I did try an older version (v3.5.0), but it does the exact same thing.
and after pm2 got installed, i ran the command "pm2 startup"
after a restart, pm2 does start, but gets killed after 90 seconds and then restarts giving this message
"pm2 has been killed by signal, dumping process list before exit..."
First, I thought it was because of my app (the one that pm2 is supposed to manage), but i removed it from pm2, so it's practically empty, but it does the same thing
Running the following command as root worked for me:
pm2 update
I had the same issue and I tried several solutions online but none worked for me.
However, I completely removed pm2, restarted the server, and reinstalled pm2 and that does it for me.
1- Stop and remove pm2
pm2 kill
sudo npm remove pm2 -g
2- Restart the server
sudo reboot
3- Log in again, then reinstall pm2
sudo npm install -g pm2
I did not disable SE Linux (I think it's not safe to disable it), but the following method helped me:
Edit file: /etc/systemd/system/pm2-root.service
Add new line: Environment=PM2_PID_FILE_PATH=/run/pm2.pid
And replace: PIDFile=/root/.pm2/pm2.pid to: PIDFile=/run/pm2.pid
Versions:
CentOS 8.3.2011
Node.js 14.16.0
NPM 7.7.5
PM2 4.5.5
Original answer. Thanks Alec!
Later update. For those who are facing the same issues. It's an issue related to SE Linux. Known workarounds (the ones I discovered).
Disabling SE Linux (obviously, not recommended)
go to /etc/systemd/system/pm2-root.service - comment PIDFile=... (add a # in front of that line)
Audit and trace - use following commands:
# dnf install policycoreutils-python-utils setroubleshoot-server -y
# journalctl -f
At ths point, you should see the solution in the output (the log)
it should be something like:
# ausearch -c 'systemd' --raw | audit2allow -M my-systemd
# semodule -i my-systemd.pp
You need to do the last step (ausearch... and semodule...) twice - I did it once, restarted the machine and noticed the same issue after 90 seconds. But if you read the log carefully, you will notice that the issue seems to be outputed twice. (looks the same). Probably two things are trying to write to that file (pm2-root.service).
Still waiting for the perfect solution (done by the person that really knows how to fix this in a proper manner), but for those that have this issue, any of these options seem to work just fine.
I've had this problem (on Debian), when for some reason two "PM2 God Daemon" processes (not threads) were launched, so they conflicting with each other.
Killing one of them solved the issue.

apt-get install error while processing vsftpd: cannot create directory

I receive the following error when using RVM to install ruby with rvm install 2.3.0. This is from the log file RVM produces.
Setting up vsftpd (3.0.3-8+b1) ...
vsftpd user (ftp) already exists, doing nothing.
mkdir: cannot create directory ‘/srv/ftp’: Permission denied
dpkg: error processing package vsftpd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
vsftpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Infact, anytime I run an apt-get install command I always get this warning about vsftpd. I have always just ignored it as packages install just fine. The main problem now is that RVM is now picking up on this error as being critical so it stops installing Ruby.
The problem is that the folder /srv/ftp physically can not be created even by root (or at least I don't know how to). The way my server is set up is that the /srv/ folder only exists to mount external disk drives so I can't create an arbitrary folder here.
E.g. datadisk01 would be mounted onto /srv/datadisk01
Is there a way to change where vsftpd creates this ftp folder to a different location so it will run properly? OR is there a way I can force RVM to ignore this error message?
I would prefer the answer that fixes the error but my main objective is just to get Ruby installed.
I have already tried removing vsftpd with apt-get but it still persists.

unable to proceed in drupal installation due to these errors

The following error occurs--
initially i encountered the AJAX error: 200, that still remains, but the installation proceeded further.. and now i encountered this error. unable to install the modules.
The ajax error on install is often due to the execution time in your php.ini being too low. Change it to 2/3mins or more if your environnement is not the production one. The modules install problem might be linked.