Configure sendmail inside a docker container
Question I have a docker container running PHP and Apache. The host is in an AWS instance which has the docker instance running. I am unable to send an email from the docker terminal. Is there any way to send an email from docker instance using sendmail which uses the docker's host's configuration?
The following command sends an email from host but doesn't send an email from docker instance. No error is given either.…
Read more ⟶Linux custom executable globally available
Question I downloaded the Google App Engine as a zip format, unzipped it to /usr/local/google_engine
Now I need to run a python script from that folder all the time. How do I make it available no matter where my path is? ie: when i'm in /usr/something/ i can execute the script by just calling script.py?
Can I do this without aliasing or without using bash scripts?
Answer Edit your .bashrc to add the desired directory on the PATH environmental variable.…
Read more ⟶How to update Certbot version?
Question I am running certbot --apache but I get the following error:
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.
Version installed is 0.10.2 on Debian 8.10
I would like to upgrade to 0.21.0 which should fix the issue https://community.letsencrypt.org/t/certbot-0-21-0-release/50725
but I tried apt-get update/upgrade and I get the following:…
Read more ⟶How to use Python variables in Google Colab terminal command?
Question I have a cell with this content:
import os
os.mkdir('123')
name = '123'
!rm -r name
I want to pass the value of the variable name to the last line.
How can I do this?
Answer Try $. It will substitute the python variable.
!rm -r $name
You may need to use $name\.txt or {name}.txt in some cases.…
Read more ⟶AttributeError: 'NoneType' object has no attribute 'loader''
Question having an issue today when I started up my laptop (Ubuntu 18.4) and trying to use pip to install packages, I'm met with this error:
Error processing line 3 of /home/cjones/.local/lib/python3.6/site-packages/googleapis_common_protos-1.5.8-py3.6-nspkg.pth:
Traceback (most recent call last): File “/usr/lib/python3.6/site.py”, line 174, in addpackage exec(line) File “<string>”, line 1, in <module> File “<frozen importlib._bootstrap>”, line 568, in module_from_spec AttributeError: ‘NoneType’ object has no attribute ’loader’
Remainder of file ignored I don't think I changed anything since last successful boot but it seems as though something is missing.…
Read more ⟶psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "postgres" (Ubuntu)
Question When I try to open psql with this command:
psql -U postgres
I get this error:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "postgres"
But it connects successfully when I use:
sudo -u postgres psql
Can someone please explain what is happening and how to diagnose/fix this problem? My pg_hba.conf contains the following:
# Database administrative login by Unix domain socket
local all postgres peer
TYPE DATABASE USER ADDRESS METHOD “local” is for Unix domain socket connections only local all all md5…
Read more ⟶Can't install vagrant plugins in Ubuntu
Question I was trying to install vagrant plugin vbguest, but got following errors in terminal:
$ vagrant plugin install vbguest
Installing the 'vbguest' plugin. This can take a few minutes...
/usr/lib/ruby/2.3.0/rubygems/specification.rb:946:in `all=': undefined method `group_by' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:275:in `with_isolated_gem'
from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:231:in `internal_install'
from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:102:in `install'
from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:62:in `block in install_plugin'
from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:72:in `install_plugin'
from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:37:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `block in run'
from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.…
Read more ⟶