How do you install udevadm via command line? - ubuntu-16.04

I need to run udevadm trigger but it says
udevadm: missing or unknown command
How do I install this via the command line?

apt install udev should install it.
However, I just had this same problem when it was already installed! That message is from udevadm telling you it needs a command.
Try running udevadm monitor
Edit: just noticed you were passing trigger, my best guess is that this is an unknown subcommand for whatever version of udevadm you have. For the record, here is what I get on Ubuntu 18.04:
$ udevadm
udevadm: missing or unknown command
$ udevadm trigger
$ udevadm monitor
monitor will print the received events for:
...

Related

When running yocto runqemu the ip seems not to be found

I have built a yocto image (just for reference see the end of this question)
when I try to run it with runqemu I get the following error:
runqemu - ERROR - runqemu-ifup: /opt/yocto/workspace/openembedded-core/scripts/runqemu-ifup
runqemu - ERROR - runqemu-ifdown: /opt/yocto/workspace/openembedded-core/scripts/runqemu-ifdown
runqemu - ERROR - ip: None
runqemu - ERROR - In order for this script to dynamically infer paths
kernels or filesystem images, you either need bitbake in your PATH
or to source oe-init-build-env before running this script.
I have sourced ot-init-build-env before running the script.
It seems the ip is not found. Do I need to modify /etc/hosts before running it?
The project I am using is meta-ros but I am building my images inside a docker image as in this repository
In this tutorial Step 5 it says
--
You start this system in the qemu virtual machine with
runqemu <MACHINE> core-image-ros-roscore
The <MACHINE> is the identifier that is set in the local.conf, e.g., qemux86. On the Linux virtual machine system, you can log in as root with the empty password. Now, you ensure that the own host's name in resolved by adding
127.0.0.1 <HOSTNAME>.localdomain <HOSTNAME>
to the /etc/hosts file,
What is HOSTNAME here?
this is actually complaining about the "ip" command not
being found, not your IP address, you need to install it.
Depending on your distribution the package name may change, but for Ubuntu/Debian the package you need is iproute2
sudo apt update && sudo apt install iproute2
Should do the trick.
Also, in case you didnt install the required packages, you may be missing a few others, you can get the list of required packages from here:
https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html#build-host-packages

Minikube: bash: /usr/local/bin/minikube: No such file or directory

I just installed Minikube for my Kubernetes local setup on Ubuntu 18.04 using the following command:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb
However, when I run the command:
minikube start
I get the following error:
bash: /usr/local/bin/minikube: No such file or directory
I'm really wondering what the issue will be.
I just figured it out after some research and trial.
Here's how I fixed it:
I simply closed that terminal and opened a new one, and ran the command again:
minikube start
OR
minikube start --driver=virtualbox
And it worked fine.
Note: By default minikube attempts to use Docker as the driver, but you specify VirtualBox as your preferred driver, which has some advantages.
Another way would have been to reload the Ubuntu bash terminal:
bash --login
Note:
If all the above techniques do not work, you add the Minikube executable to your path:
sudo mv minikube /usr/local/bin
You can then verify the Minikube executable path:
which minikube.
That's all.
I hope this helps

Anaconda-navigator does not start after installation on Tumbleweed

Similar to anaconda-navigator does not start,
I could not start anaconda-navigator after installation.
My system is:
NAME="openSUSE Tumbleweed"
# VERSION="20200826"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20200826"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20200826"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
LOGO="distributor-logo"
I ran:
(base) xxxx#xxxx:~> anaconda-navigator
,and got:
No protocol specified
qt.qpa.screen: QXcbConnection: Could not connect to display :0.0
Could not connect to any X display.
I installed it following https://docs.anaconda.com/anaconda/install/linux/ (dependencies, checked) and running bash ~/Downloads/Anaconda3-2020.07-Linux-x86_64.sh
anaconda-navigator does not start said a system update solved the problem. But, that didn't do it for me. There was no update left for zypper to do.
I can run conda and anaconda commands, but I can't run GUI software. What can I do?
I got the same error message.
With running
xhost +
first I can start anaconda-navigator. But this seems a rather desperate hack ....

Gitlab not starting after upgrade to Ubuntu 18.04

I have successfully upgraded Gitlab to 12.1.6 on Ubuntu 16.04 and checked that all was working. After making sure Ubuntu was fully up to date I checked again: Gitlab worked.
I then used the do-release-upgrade command to update to Ubuntu 18.04. After restart, everything seems to work ok, but Gitlab refuses to start.
I get the following errors:
fail: alertmanager: runsv not running
fail: gitaly: runsv not running
fail: gitlab-exporter: runsv not running
fail: gitlab-workhorse: runsv not running
fail: grafana: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: node-exporter: runsv not running
fail: postgres-exporter: runsv not running
fail: postgresql: runsv not running
fail: prometheus: runsv not running
fail: redis: runsv not running
fail: redis-exporter: runsv not running
fail: sidekiq: runsv not running
fail: unicorn: runsv not running
I tried:
gitlab-ctl reconfigure --> runs with success
I installed runit with success, rebooted the machine but the errors remain
I found a similar issue here: on Stackoverflow, followed the instructions (yum --> apt), still no success
and here on Gitlab. This advised to run
sudo systemctl restart gitlab-runsvdir
sudo gitlab-ctl restart
But the first command never finishes
I found this: on Gitlab which states to run
sudo gitlab-rake gitlab:env:info --trace
Output:
** Invoke gitlab:env:info (first_time)
** Invoke gitlab_environment (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab_environment
** Execute gitlab:env:info
System information
System: Ubuntu 18.04
Current User: git
Using RVM: no
Ruby Version: 2.6.3p62
Gem Version: 2.7.9
Bundler Version:1.17.3
Rake Version: 12.3.3
Redis Version: 3.2.12
Git Version: 2.24.1
Sidekiq Version:5.2.7
Go Version: unknown
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
/opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `initialize'
/opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `new'
/opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56:in `connect'
which suggests that the Postgresql server is not running. I have no idea how to start it. Any ideas?
UPDATE: Since then I found an answer that said for some reason on the reboot command the runsv process gets stuck. To solve this you have to:
sudo service gitlab-runsvdir start
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
I wanted to post the same above question. This happens to me when i do the monthly upgrade/updates to our GitLab. I tried your solution before, but to me they didn't solve the problem.
I present my solution, but use these tips with caution, as I still sometimes struggle with this problem in different ways.
I do a combination of these command, the order of these steps are really important(!):
sudo systemctl disable gitlab-runsvdir.service
sudo gitlab-ctl reconfigure
sudo gitlab-rake db:migrate
sudo gitlab-ctl restart gitlab-runsvdir--has to be aborted with Ctrl-C
sudo /opt/gitlab/embedded/bin/runsvdir-start--has to be aborted with Ctrl-C
Reference:
In this issue Stan Hu's answer helped me:
https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/3744
Now yesterday I messed up and didn't do the first step, which could cause my problems, because somehow then for 10 hours the postgresql server was down and it couldn't make it back up again.
If i would have stick to the order, maybe it wouldn't have happened, because it didn't happen in the past while I upgraded/updated GitLab several times.
This was the connection error yesterday, same issue as questioner's
Automatic restart this morning
This morning magically the server at 7:13 am, was accepting connections again. (althought i tried to restart it yesterday, it didn't make any difference then)
Still GitLab wasn't reachable online from web browser as of 7:30 am.
One hour later, and a few runsvdir restarting/starting commands after (added it to the commands order), the GitLab is working. I have no idea why.
Got the same problem, and I ended up running /opt/gitlab/embedded/bin/runsvdir-start manually. I fixed my problem, launched reconfigure, and then it worked from there.
I ran into a similar runsv error, but only saw it for once service, not the whole list you have. These steps are a log of my attempts to get it working - probably not a direct line, but my local Gitlab does work now:
In the CentOS vm:
vi /etc/gitlab/gitlab.rb
change the external_url from http://example.gitlab.com to http://192.168.1.131
sudo gitlab-ctl reconfigure
first observed the error runsv not running
yum update -y
sudo gitlab-ctl status
sudo gitlab-ctl restart
sudo gitlab-ctl reconfigure
systemctl start gitlab-runsvdir.service
systemctl status gitlab-runsvdir.service
sudo gitlab-ctl reconfigure
still saw an error about runsv not running, several times, but it was never a blocker and the reconfigure was successful
On host
navigate to 192.168.1.131
See the prompt for root password
As for the issue with Postgres, I'm not sure

Capistrano is hanging when prompting for SUDO password to an Ubuntu box

I have a capistrano deployment recipe I've been using for some time to deploy my web app and then restart apache/nginx using the sudo command. Recently cap deploy is hanging when I try to execute these sudo commands. I see the output:
"[sudo] password for "
With my server name and the remote login, but this is not a secure login prompt. The cap shell is just hanging waiting for more output and does not allow me to type my password in to complete the remote sudo command.
Is there a way to fix this or a decent work around? I did not want to remove the sudo password prompt of my remote user for web restart commands.
This seems to happen when connecting to CentOS machines as well. Add the following line in your capistrano deploy file:
default_run_options[:pty] = true
Also make sure to use the sudo helper instead of executing sudo in your run commands directly. For example:
# not
run "sudo chown root:root /etc/my.cnf"
# but
sudo "chown root:root /etc/my.cnf"
The other advice may be sound, but I found that once I updated to Capistrano 2.5.3 the problem went away. I have to make sure I stop running the default versions of tools that came with my O/S.
# prevent sudo prompting for password
set :sudo_prompt, ""