problems installing openvpn client - gnupg

following the instructions on the official vpn page (instructions install openvpn client) in the second step:
curl -fsSL https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg
I get the following error message:
sudo curl -fsSL https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg
-bash: /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg: Permission denied
(23) Failed writing body
Thanks in advance!!!

I had a similar issue recently. Use
sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
and
sudo apt-key add openvpn-repo-pkg-key.pub
Reference -
https://openvpn.net/cloud-docs/openvpn-3-client-for-linux/

The tutorial you posted is still valid, but as it was pointed out in the comments, you have to run the commands as superuser (I just tested sudo but it wouldn't work either).
Moreover, apt-key is mostly deprecated, so be careful with the accepted solution. If you follow the steps there, you will get a deprecation warning every time you run apt update.

Related

Cannot bypass security when trying to install Homebrew on new Macbook Pro

I am trying to install homebrew using:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
but then this error appears:
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
I tried adding -k:
/bin/bash -c "$(curl -fsSLk https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
but that still doesn't seem to work.
You can download Homebrew script from your browser directly. All you need to do is:
open this https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
And save script to any folder then run this command in Terminal.
/bin/bash install.sh
Note: Don't forget to change directory to where downloaded script is available.
I will post more update if I find this curl problem fix. :)

opam init failure upon attempted OCaml installation on MacOS 10.14.16

I am attempting to install OCaml via the OCaml opam package manager on MacOs. I have successfully installed opam via homebrew. Initiating the package manager with opam init yields the following error:
[ERROR] Could not update repository "default":
OpamDownload.Download_fail(_, "Curl failed: \"/usr/bin/curl
--write-out %{http_code}\\\\n --retry 3 --retry-delay 2
--user-agent opam/2.1.0 -L -o
/private/var/folders/c_/6splkz692w16x82lzgnsxgfr0000gn/T/opam-57814-6b2069/index.tar.gz.part
-- https://opam.ocaml.org/index.tar.gz\" exited with code 60")
[ERROR] Initial download of repository failed.
What can I do to facilitate successful connection to the repository and initialise opam?
This error message indicates that curl is unable to establish the authenticity of the peer, i.e., https://opam.ocaml.org
This could happen because the certificates on either side are outdated. We can easily check if opam.ocaml.org is up-to-date, using one of the available online SSL checkers, e.g., this one says that they are OK. So it looks like that the problem is on your side.
First of all, you should try using your operating system upgrading options to get everything up-to-date.
If it is not an option, then you can use the --insecure option that you can pass using the OPAMFETCH environment variables. Or you can download the corresponding certificates and store a path to them in the ~/.curlrc, look here for more information.
I had the same problem and solved it by first running brew install wget and then opam init, which suddenly worked.
I ran into the same issue and I found a workaround on the OCaml forum: here. (Credits to UnixJunkie)
You can run:
opam init github git+https://github.com/ocaml/opam-repository.git
This should avoid the certificate issues.
I tried to use ivg's solution but must have made a mistake in moving the .pem files, so I couldn't get that solution to work. The workaround was quick.
Update
The reason opam init failed for me was because curl was installed with snap on my system.
Try to run opam init -verbose and that could reveal more about why you ran into an error.
In my case I needed to install other things with opam and it kept failing every time. So snap uninstall curl and then sudo apt install curl fixed things. (Was only able to figure this out with help from my professor)
Install curl first.
On MacOS: brew install curl
On Debian/Ubuntu Linux (and derivations): sudo apt-get install curl

python[poetry] installation is getting stuck

I am using the following curl command to install poetry
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
but poetry is getting stuck as shown in the image. Any help?
It could be related to the underlying use of pip and the keyring, it happened to me too with Poetry and found that was the underlying cause (see https://github.com/pypa/pip/issues/7883)
My temporary workaround is to disable the keyring by setting an env var.
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
My problem was that I had my machine set to check an Artifactory server that requires VPN access. I wasn't on the VPN so it was stuck trying to get to it.
This happened to me too, my issue was that some dependencies got stuck, so when I ran the installation with -vvv it got stuck on
<internal artifactory>: Downloading wheel: black-22.3.0-py3-none-any.whl
and running
poetry cache clean --all <internal artifactory>
helped.
The installation after wiping cache took long, but actually finished.

How to install Heroku CLI on Raspberry PI 3

THIS HAS BEEN SOLVED READ ANSWER BELOW ON HOW TO DOWNLOAD HEROKU CLI ON RPI3
Just saying. Sorry if this has been asked before - I coudnt find it.
I have a Raspberry PI 3 and I am trying to install Heroku CLI. If I try to do it the normal way, for ubuntu or linux, it fails.Can't install Heroku CLI on Raspbian dosent wokr becasue i get error
wget https://cli-assets.heroku.com/branches/stable/heroku-OS-ARCH.tar.gz
--2018-05-23 17:15:46-- https://cli-assets.heroku.com/branches/stable/heroku-OS-ARCH.tar.gz
Resolving cli-assets.heroku.com (cli-assets.heroku.com)... 54.230.9.187, 54.230.9.194, 54.230.9.84, ...
Connecting to cli-assets.heroku.com (cli-assets.heroku.com)|54.230.9.187|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-05-23 17:15:50
ERROR 404: Not Found.
This post however dosent work either Heroku CLI alternative download location
and returns error
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
dpkg: error processing package heroku (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of heroku-toolbelt:
heroku-toolbelt depends on heroku (= 3.99.4); however:
Package heroku is not configured yet.
dpkg: error processing package heroku-toolbelt (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
heroku
heroku-toolbelt
E: Sub-process /usr/bin/dpkg returned an error code (1)
when i run the command
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
OK guys i figured it out. If the posts above didnt work for you this is how to do it
This is how you install Heroku CLI onto a raspberry pi 3
Step 1: Make sure you have sudo privilages. The default RPI3 account has sudo so you need not worry about this If you cant get sudo privilages you may still be able to download the CLI .
How to check if you have sudo enabled
run these following commands from terminal
sudo su
If you have sudo privileges the terimal should now say
root#ControlUnit:/home/[Your account name]
or something along those lines.
then run exit then continue with steps
If it does continue with the next steps.
If not- if you own RPI3 then login into the default account(password: raspberry) and do sudo adduser [yourname] -g sudo. If you do not own it ask the owner to do this
Sudo aside
This is how you do the heroku CLI:
Run the following commands
wget https://cli-assets.heroku.com/branches/stable/heroku-linux-arm.tar.gz
what this does is it installs a outdated copy(you can update it later) made for the Raspberry Pi. Then run this command
mkdir -p /usr/local/lib /usr/local/bin
This is the part where you have to use sudo. If you cant use sudo still try the commands.
sudo tar -xvzf heroku-OS-ARCH.tar.gz -C /usr/local/lib
sudo ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku
Then just make sure you have it run in the terminal
heroku version
or heroku --version
it should come up saying something along the lines of
heroku-cli/5.7.1-c574890 (linux-arm) go1.7.5
then run
heroku update
and your done!
COPY PASTE COMMANDS*
wget https://cli-assets.heroku.com/branches/stable/heroku-linux-arm.tar.gz
mkdir -p /usr/local/lib /usr/local/bin
sudo tar -xvzf heroku-linux-arm.tar.gz -C /usr/local/lib
sudo ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku
heroku update
Instead of sudo tar -xvzf heroku-OS-ARCH.tar.gz -C /usr/local/lib as noted in the original post, the correct command should be sudo tar -xvzf **heroku-linux-arm.tar.gz** -C /usr/local/lib

Synapse Home server(Matrix) not running

I have installed synapse using the following commands:
link: https://github.com/matrix-org/synapse
Installing prerequisites on Mac OS X:
xcode-select --install
sudo easy_install pip
sudo pip install virtualenv
brew install pkg-config libffi
To install the synapse homeserver run:
virtualenv -p python2.7 ~/.synapse
source ~/.synapse/bin/activate
pip install --upgrade setuptools
pip install https://github.com/matrix-org/synapse/tarball/master
Generate a configuration file
cd ~/.synapse
python -m synapse.app.homeserver \
--server-name my.domain.name \
--config-path homeserver.yaml \
--generate-config \
--report-stats=yes
To get started, it is easiest to use the command line to register new users:
$ source ~/.synapse/bin/activate
$ synctl start # if not already running
$ register_new_matrix_user -c homeserver.yaml https://localhost:8448
New user localpart: user123
Password:
Confirm password:
Server started successfully, but user registration failed and
i opened "https://localhost:8448" in the browser and i got the following:
Can anybody help to solve this?
Your homeserver is probably not starting correctly. Try to get the JSON response about supported versions by executing following in you shell:
curl https://localhost:8448/_matrix/client/versions -k
This should result in a JSON response listing protocol versions:
{
"versions": [
"r0.0.1",
"r0.1.0",
"r0.2.0"
]
}
If that's not working - to find out the real issue you can try:
Check if it's running at all with sudo service matrix-synapse status
Check the log file at /var/log/matrix-synapse/homeserver.log
I will update the answer, in case you can provide more details.
The web client should be accessible at the following URL:
https://localhost:8448/_matrix/client/
However the documentation states:
(The homeserver runs a web client by default at
https://localhost:8448/, though as of the time of writing it is
somewhat outdated and not really recommended -
https://github.com/matrix-org/synapse/issues/1527).
You should use a client such as the one at https://riot.im/app/

Resources