Unable to install fedy on Fedora 22 - installation

I am following this guide:- Here
In short it tells to do following:-
Download the latest version using the command:
wget http://satya164.github.io/fedy/fedy-installer
Set executable permission and install as shown below:
chmod +x fedy-installer
sudo ./fedy-installer
To install Fedy on Fedora 22.
But I am getting the following error.
[root#localhost Downloads]# sudo ./fedy-installer
Adding repositories...
Installing fedy...
Failed to synchronize cache for repo 'ozonos' from 'http://goodies.ozon-os.com/repo/22/': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried, disabling.
Last metadata expiration check performed 1:27:26 ago on Fri Jul 24 14:11:58 2015.
No package fedy available.
Error: no package matched: fedy
I tried opening goodies.ozon-os.com/repo/22/ but it is not opening on my firefox browser....is there another way to install fedy on fedora 22?
Thank you.

To install fedy, try the steps provided here: http://folkswithhats.org/
The host site for Ozon OS repository (http://goodies.ozon-os.com/) seems to be down, probably permanently, not sure if it has been moved or abandoned. It's no longer needed for upgrading fedy.
You can either remove the repo from your list...
rm -f /etc/yum.repos.d/ozonos.repo
...or, if still unsure, just disable it
dnf config-manager --set-disabled ozonos

bash -c 'su -c "curl http://folkswithhats.org/fedy-installer -o fedy-installer && chmod +x fedy-installer && ./fedy-installer"'

Related

dnf broken: all mirrors were tried

I don't know how to describe my problem because I don't understand why it happen ... When i enter
sudo dnf install (any packet)
It return me this
Tor Project Repo 407 B/s | 264 B 00:00
Error: Failed to download metadata for repo 'Tor': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Its obvious that Tor is related to that mess but i don't know why.
I tried nothing because I'm afraid to do something wrong. I'm on fedora 30.
(english baguette)
It seems like you have a broken repository. Probably you will find this repository in:
ls /etc/yum.repos.d/
there will probably be a file named tor*.repo. If you remove that file (or edit it to contain enabled=0), then dnf should start working correctly again.
Failed to download metadata for repo ‘bintray–resin-io-redhat’: Cannot download repomd.xml: Cannot download repodata/repomd.xml
I was getting same error for kubernetes.repo. It got resolved by setting enabled=0 in /etc/yum.repos.d/kubernetes.repo. Now I can download other package (example Nginx that I was unable to download).
I tried this command and my problem fixed:
sudo rm -r /var/cache/dnf
This worked for me -
cd /etc/yum.repos.d
rm -rf .
yum upgrade
yum update
Note: redhat.repo will regenerate itself on the next yum run, and in the process some repositories will stay lost, be careful.

How to install Terragrunt 0.19.x version on Mac book

How to Install terragrunt 0.19.x Version on Macbook?
I tried brew install terragrunt which is Downloading 0.18.x only.
Option1:
brew install terragrunt
touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied
error: could not lock config file .git/config: Permission denied
==> Downloading https://homebrew.bintray.com/bottles/terragrunt-0.18.3.mojave.bottle.tar.gz
Already downloaded: /Users/rohithgundala/Library/Caches/Homebrew/downloads/f494cc7ebcfadf5e2610048e6c9f937e0151ff46cf0c226d83118e6d8ba704cc--terragrunt-0.18.3.mojave.bottle.tar.gz
==> Pouring terragrunt-0.18.3.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/terragrunt/0.18.3: 3 files, 19.6MB
Option2:
# Install Terragrunt
RUN wget -q -O ${BIN_DIR}/terragrunt "https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux _amd64" \
&& chmod +x ${BIN_DIR}/terragrunt
Output:
bin/terragrunt: cannot execute binary file
Install Homebrew as described at https://brew.sh/.
Then run the following:
git clone https://github.com/cunymatthieu/tgenv.git /usr/local/Cellar/tgenv
ln -s /usr/local/Cellar/tgenv/bin/* /usr/local/bin
tgenv install 0.19.31
tfenv use 0.19.31
tgenv is a version manager for Terragrunt. https://github.com/cunymatthieu/tgenv/blob/master/README.md
It's extremely handy when you need to use a specific version or multiple versions on the same machine.
tfenv is a related tool and does the same for the terraform command: https://github.com/tfutils/tfenv
For newer versions of Mac OS the kernel is Darwin and the above answer will not work with an error like:-
zsh: exec format error
Please confirm that by running command uname -a and download the file specific to that kernel "terragrunt_darwin_amd64" for whatever version you want.
So below should work :-
wget -q -O /bin/terragrunt "https://github.com/gruntwork-io/terragrunt/releases/download/v0.xx.x/terragrunt_darwin_amd64"
chmod +x /bin/terragrunt
terragrunt -v
I found Answer for this.
wget -q -O /bin/terragrunt "https://github.com/gruntwork-io/terragrunt/releases/download/v0.xx.x/terragrunt_linux_amd64"
chmod +x /bin/terragrunt
terragrunt -v

protoc: command not found (Linux)

I am trying to use Protobuf on Linux box. I downloaded the pre-compiled from github.
When I try to compile my .proto file or just check the protobuf version, it says
protoc: command not found.
I tried the same steps on Windows machine using pre-compiled protobuf version and it works fine there.
Install protoc for Linux and Mac
Linux
PROTOC_ZIP=protoc-3.15.8-linux-x86_64.zip
curl -OL https://github.com/google/protobuf/releases/download/v3.15.8/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local include/*
rm -f $PROTOC_ZIP
Mac OS X
brew install protobuf
Alternately, if you don't have Homebrew.
PROTOC_ZIP=protoc-3.15.8-osx-x86_64.zip
curl -OL https://github.com/google/protobuf/releases/download/v3.15.8/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
rm -f $PROTOC_ZIP
source: http://google.github.io/proto-lens/installing-protoc.html
For Linux Ubuntu 20, only install with snap
snap install protobuf --classic
or via apt, with:
sudo apt install protobuf-compiler
You can try it:
Install grpc and protobuf
brew install grpc protobuf
I know this question is specifically asked for Linux and I could n't find any question as it relates to solving this error on Windows.
This might help people who encounter the same error on windows.
Step 1: Download the windows distribution (protoc-3.5.0-win32.zip) from the link protobuf and unzip locally to a folder
Step 2 : Add the folder path to the path in the system environment variables.
Step 3: close the command prompt, restart the command prompt and try the command protoc
I might be late to the party but I also had "command not found" when trying to run protoc. It turned out it was just missing the execute permission. A quick chmod +x protoc fixed this for me.

wkhtmltopdf: cannot connect to X server

I have been using wkthmltopdf to convert html to pdf documents on-the-fly on my linux web server. The program originally needed X11 or similar X server to run correctly, but through many requests by developers to have this run on servers without GUI, I am pretty sure it runs a virtual X server in the static version. I have been using the static (stand-alone) version of the program and it works great! I would put the executable file in a folder, and run:
./wkhtmltopdf file1.html file2.pdf
However I would like to install this program system-wide. I used the apt-get install wkhtmltopdf (just installed yesterday) and since I am running on a 64 bit system, I also needed apt-get install ia32-libs. After installation I can find the version like this:
wkhtmltopdf --version
output:
Name:
wkhtmltopdf 0.9.9
License:
Copyright (C) 2008,2009 Wkhtmltopdf Authors.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
Authors:
Written by Jakob Truelsen. Patches by Mário Silva, Benoit Garret and Emmanuel
Bouthenot.
Now when I try to run the program installed via aptitude, I get the following error:
wkhtmltopdf: cannot connect to X server
Does anyone know how I can fix this? I guess this version is missing a virtual X server or something.
or try this (from http://drupal.org/node/870058)
Download wkhtmltopdf. Or better install it with a package manager:
sudo apt-get install wkhtmltopdf
Extract it and move it to /usr/local/bin/
Rename it to wkhtmltopdf so that now you have an executable at /usr/local/bin/wkhtmltopdf
Set permissions: sudo chmod a+x /usr/local/bin/wkhtmltopdf
Install required support packages.
sudo apt-get install openssl build-essential xorg libssl-dev
Check to see if it works: run
/usr/local/bin/wkhtmltopdf http://www.google.com test.pdf
If it works, then you are done. If you get the error "Cannot connect to X server" then continue to number 7.
We need to run it headless on a 'virtual' x server. We will do this with a package called xvfb.
sudo apt-get install xvfb
We need to write a little shell script to wrap wkhtmltopdf in xvfb. Make a file called wkhtmltopdf.sh and add the following:
xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf "$#"
Move this shell script to /usr/local/bin, and set permissions:
sudo chmod a+x /usr/local/bin/wkhtmltopdf.sh
Check to see if it works once again: run
/usr/local/bin/wkhtmltopdf.sh http://www.google.com test.pdf
Note that http://www.google.com may throw an error like "A finished ResourceObject received a loading finished signal. This might be an indication of an iframe taking to long to load." You may want to test with a simpler page like http://www.example.com.
This solved the issue for me:
sudo apt-get install xvfb
xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltopdf file1.html file2.pdf
I tried to do sudo apt-get install wkhtmltopdf but without any success.
Instead I recommend you try:
Download the latest executable (.11 rc1) :
wget https://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
uncompress it :
tar -vxf wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
rename it :
mv wkhtmltopdf-i386 wkhtmltopdf
chmod it to executable :
chmod a+x wkhtmltopdf
place it into /usr/bin :
sudo mv wkhtmltopdf /usr/bin
Just made it:
1- To download wkhtmltopdf dependencies
# apt-get install wkhtmltopdf
2- Download from source
# wget http://downloads.sourceforge.net/project/wkhtmltopdf/xxx.deb
# dpkg -i xxx.deb
3- Try
# wkhtmltopdf http://google.com google.pdf
Its working fine
It works!
I found method to resolve this problem without fake X server.
In newest version of wkhtmltopdf dont need X server for work, but it no into official linux repositories.
Solution for Ubuntu 14.04.4 LTS (trusty) i386
$ sudo apt-get install xfonts-75dpi
$ wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-trusty-i386.deb
$ sudo dpkg -i wkhtmltox-0.12.2_linux-trusty-i386.deb
$ wkhtmltopdf http://www.google.com test.pdf
Solution for Ubuntu 14.04.4 LTS (trusty) amd64
$ sudo apt-get install xfonts-75dpi
$ wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-trusty-amd64.deb
$ sudo dpkg -i wkhtmltox-0.12.2_linux-trusty-amd64.deb
$ wkhtmltopdf http://www.google.com test.pdf
User felixhummel got very good solution, but repository with utilite has changed.
Expanding on Timothy's answer...
If you're a web developer looking to use wkhtmltopdf as part of your web app, you can simply install it into your /usr/bin/ folder like so:
cd /usr/bin/
curl -C - -O http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
tar -xvjf wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
mv wkhtmltopdf-i386 wkhtmltopdf
You can now run it anywhere using wkhtmltopdf.
I personally use the Snappy library in PHP. Here is an example of how easy it is to create a PDF:
<?php
// Create new PDF
$pdf = new \Knp\Snappy\Pdf('wkhtmltopdf');
// Set output header
header('Content-Type: application/pdf');
// Generate PDF from HTML
echo $pdf->getOutputFromHtml('<h1>Title</h1><p>Your content goes here.</p>');
Update to latest wkhtmltopdf version from SourceForge (0.12 as of this writing). It does not need an X Server to run.
Example for Ubuntu 14.04:
$ cd /tmp/
$ wget -q http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
$ dpkg -x wkhtmltox-0.12.2.1_linux-trusty-amd64.deb foo
$ echo '<p>hi</p>' | ./foo/usr/local/bin/wkhtmltopdf - /tmp/hi.pdf
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
$ head -n3 /tmp/hi.pdf
%PDF-1.4
1 0 obj
<<
for 14.04.1-Ubuntu https://wkhtmltopdf.org/downloads.html
wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -O mktemp.tar.xz
tar xf mktemp.tar.xz
sudo cp wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
sudo chmod +x /usr/bin/wkhtmltopdf
rm mktemp.tar.xz
rm wkhtmltox -rf
apt-get update
apt-get install -y libxrender1 libxtst6 libxi6
wkhtmltopdf http://www.google.com test.pdf
sudo -i
apt-get install wkhtmltopdf xvfb libicu48
mv /usr/bin/wkhtmltopdf /usr/bin/wkhtmltopdf-origin
touch /usr/bin/wkhtmltopdf && chmod +x /usr/bin/wkhtmltopdf && cat > /usr/bin/wkhtmltopdf << END
#!/bin/bash
/usr/bin/xvfb-run -a -s "-screen 0 1024x768x24" /usr/bin/wkhtmltopdf-origin "\$#"
END
Problem is probably in old version of wkhtmltopdf - version 0.9 from distribution repository require running X server, but current version - 0.12.2.1 doesnt require it - can run headless.
Download package for your distribution from http://wkhtmltopdf.org/downloads.html and install it - for Ubuntu:
sudo apt-get install xfonts-75dpi
sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
wkhtmltopdf > 0.11 doesn't have this X-server issue.
So installing 0.12.2.1 on a linux server.
At first install xvfb server:
sudo apt-get install xvfb
Get needed version of wkhtmltopdf from http://wkhtmltopdf.org/downloads.html
Install wkhtmltopdf:
sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
or install with wget
URL='http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb'; FILE=`mktemp`; wget "$URL" -qO $FILE && sudo dpkg -i $FILE; rm $FILE
Install dependency (if needed):
sudo apt-get -f install
Create symblic link in /usr/local/bin/:
echo 'exec xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf "$#"' | sudo tee /usr/local/bin/wkhtmltopdf.sh >/dev/null
sudo chmod a+x /usr/local/bin/wkhtmltopdf.sh
Now try below and it should work,
/usr/local/bin/wkhtmltopdf http://www.google.com test.pdf
I just figured out that I can simply move the static executable to the /usr/bin/ directory and execute it from anywhere.
solution for Centos7:
yum -y install xorg-x11-fonts-75dpi \
xorg-x11-fonts-Type1 \
&& rpm -Uvh http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
We run into this problem inside docker containers and the above install has wkhtmltopdf with patched QT
It is recommended to use at least 0.12.2.1.
Starting from wkhtmltopdf >= 0.12.2 it doesn't require X server or emulation anymore. You can download new version from http://wkhtmltopdf.org/downloads.html
I did follow the instructions here and made wkhtmltopdf work for me but I would like to offer a bit of perspective which I discovered while doing my own little dance with wkhtmltopdf - xvfb.
This is important because the same reason that causes it to throw the infamous cannot connect to X server error is also causing it to run with sever limitations even if you do provide it a X server. These limitations include not being able to take multiple input sources, set header and footers, etc (check the Reduced Functionality section of the manual).
wkhtmltox by itself doesn't require a X11, however it's making use of QT libraries which do. In newever versions of wkthmltox developers made a patch for QT which allows it to run with a X11.
Currently some versions are built against patched QT and some are not. You can check your version by running wkhtmltopds --version. There should be a line at the end saying Compiled against wkhtmltopdf patched qt.
So, to conclude, if you install and use a version that uses the patched libraries it should work on a linux server without the xvfb server, as I can confirm.
Pay attention: your file could be wkhtmltopdf.sh or wkhtmltopdf, check it on second step
You must copy it into directory : /usr/local/bin, make sur it's executable and add symlink of wkhtmltopdf.sh like :
1- the command :
sudo apt-get install wkhtmltopdf
2 - insert the binary in directory /usr/bin so the browser can't have permission to execute in this directory.
You must copy the wkhtmltopdf.sh to directory /usr/local/bin cause the browser have permission in this directory like:
sudo cp /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf.sh
3 - After make sur the binary have permission of execution like :
sudo chmod a+x /usr/local/bin/wkhtmltopdf.sh
4 - so now you can test, it's work like:
/usr/local/bin/wkhtmltopdf.sh http://www.google.com google.pdf
it make download the pdf in the current directory in your terminal
5 - Optional
now you can add symlink in your directory /usr/local/bin like
ln -s /usr/local/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf
Just tell the Qt backend to not use X:
QT_QPA_PLATFORM=offscreen wkhtmltopdf <input> <outfile.pdf>
Download file from this link
Extract it and move executable file(/wkhtmltox/bin/wkhtmltopdf) to /usr/bin/
Rename it to wkhtmltopdf if current name is not wkhtmltopdf. So that now you have an executable at /usr/bin/wkhtmltopdf
Set permissions: sudo chmod a+x /usr/bin/wkhtmltopdf
Install required support packages. sudo apt-get install openssl build-essential xorg libssl-dev
Now, check with wkhtmltopdf http://www.google.com test.pdf
hint: detail information from this link
Just install a version 0.12.4 or higher. This seems to solve the problem.
See How can I install the latest wkhtmltopdf on Ubuntu 16.04?.
If you config wkhtmltopdf for Rails or Somethings in Centos, you can follow these step bellow:
Go to https://wkhtmltopdf.org/downloads.html and copied the link of rpm file.
In centos server bash.
wget link_of_wkhtmltopdf_rpm.rpm
rpm -ivh link_of_wkhtmltopdf_rpm.rpm
which wkhtmltopdf
=> You will get path of wkhtmltopdf.
Setup for wicked_pdf or pdfkit with path in step 4.
This is sample config with wickedpdf. config/initializers/wicked_pdf.rb
if Rails.env != "production"
path = %x[which wkhtmltopdf].gsub(/\n/, "")
else
path = "path_of_wkhtmltopdf_in_step_4"
end
WickedPdf.config = { exe_path: path }
Restart server.
DONE.
For 64-bit Use:
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2
tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2
sudo mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf
sudo chmod +x /usr/bin/wkhtmltopdf

Is there a command to update redis?

I'm working on the front end for a web app, but I'm trying to learn as much of the backend setup as I can as well. I am setting up redis on a new computer myself, but running into a few hiccups.
The wget command cannot be found, so I assume it Linux only? I am following these instructions to install redis on Mac OS 10.7. I have redis 2.0.0 installed, but while attempting to install 2.4.4 using the same commands, I am told redis-server, redis-cli, redis-benchmark cannot be found, and I can't copy them to /usr/local/bin.
I could not find an update command to bring redis up to the most recent version. I don't think it should be this difficult to install the most recent version on redis on Mac OS, but I can't see what I am doing wrong.
So far as I know, typing:
$ brew upgrade redis
should work, where $ indicates your command line. If it complains about HomeBrew not being installed, you can obtain that here. Brew is an excellent package manager, and a great way of taking care of your files.
If you're not using brew, then these steps will help you get up to date.
First, find the location of your installed redis-server instance before updating. In my case, it was in /usr/local/bin/, but it might also be in /usr/bin/. If it's not here, you can type which redis-server to find the location.
Next, download the redis tar file from https://redis.io/download, then install it from the directory it downloaded to:
cd Downloads
tar xzf redis-X.Y.Z.tar.gz
cd redis-X.Y.Z
make test
make
Next, we'll move the new installed redis to the location where the current instance is running:
sudo mv src/redis-server /usr/local/bin
sudo mv src/redis-cli /usr/local/bin
Now you should be ready to use redis-server and redis-cli in the new version.
PS - I also moved the redis-benchmark, redis-sentinel, redis-check-aof, and redis-check-dump files because they were also already in /usr/local/bin.
Ref: http://jasdeep.ca/2012/05/installing-redis-on-mac-os-x/
It would be better to follow this way.
$ brew update
$brew upgrade redis
Create a bash file...
cd ~
nano .update_redis
Go into the tmp directory and download the latest stable version
cd /tmp
wget http://download.redis.io/redis-stable.tar.gz
Decompress the files
tar xvzf redis-stable.tar.gz
Compile
cd redis-stable
make
Copy the bin programs
cp src/redis-cli /usr/bin/
cp src/redis-server /usr/bin/
cp src/redis-benchmark /usr/bin/
Set Permissions
chmod 755 /usr/bin/redis-cli
chmod 755 /usr/bin/redis-server
chmod 755 /usr/bin/redis-benchmark
Execute
bash .update_redis

Resources