How to completely uninstall devstack and reinstall it? - openstack

I am trying to install devstack from the following link:
https://wiki.opendaylight.org/view/OVSDB:OVSDB_OpenStack_Guide
However, ./stack.sh always throws some error. Is there any way I can remove all the configurations of devstack and redo it?
This is the error I am getting:
Command "python setup.py egg_info" failed with error code 1 in /opt/stack/keystone
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+ exit_trap
+ local r=1
++ jobs -p
+ jobs=
+ [[ -n '' ]]
+ kill_spinner
+ '[' '!' -z '' ']'
+ [[ 1 -ne 0 ]]
+ echo 'Error on exit'
Error on exit
+ generate-subunit 1454006489 226 fail
+ [[ -z /opt/stack/logs ]]
+ /home/aditya/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2016-01-28-184515.txt for details
+ exit 1

Go through the same docs, anywhere that it says yum install use yum remove.
After that check if ~/DevStack still exists. If it is there run rm -fr ~/DevStack
(You could probably leave java and #standard on your system)
Though I'm left thinking if this tutorial starts with Boot from the Fedora Net Install .iso - Select the minimal package - Select your hard disk layout you might just want to start over...
I don't think OpenFlow installs it looks like it just compiles so you might want to delete the zip and the extracted folder and re-download...
What error are you getting from stack.sh?

I think the unstack.sh script is meant for that. So you just need to be in the devstack folder and fire the ./unstack.sh and sit back. Once finished you can try to reinstall with ``./stack.sh```
I am assuming you are using the devstack repo found on github https://git.openstack.org/openstack-dev/devstack.git

if anyone has the same problem. The solution is to go to :
~/devstack/tools/cap-pip.txt
And set the value pip to the last version of pip, like this :
pip==18

Delete all existing folders and use this document to install it again. Remember to clone it to a new place this time. Don't override it. And if error persists do email me or comment below. I was stuck with the same problem had to reinstall ubuntu for it but then i figured this solution. DevStack Installation All-In-One Single Machine

There is no perfect solution to uninstall Devstack. Reinstalling Ubuntu is the only way through.

Related

copy libpq.5.dylib to /usr/lib/libpq.5.dylib

I can't load packages in R because the file libpq.5.dylib is not in /usr/lib/libpq.5.dylib. It is in /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib
I tried this line: sudo ln -s /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib /usr/lib/libpq.5.dylib but I get this response: ln: /usr/lib/libpq.5.dylib: Operation not permitted
What can I do to get the file in /usr/lib/libpq.5.dylib without causing issues? This solution suggests that I may face problems down the line so I don't understand what to do.
You really don't want it in /usr/lib. Apple declared that as off-limits, and on newer macOS versions it lives on a read-only volume. Unless you're willing to go into recovery mode and manually tamper with the volume (and possibly repeat that on future OS updates), this is not the way to go.
Instead, let's address the core issue:
Dynamic libraries on macOS embed their own install path inside the binary, and the linker copies that into binaries linking against them. This information can be changed with install_name_tool (see man install_name_tool).
Examine the install name of the dylib:
otool -l /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib | fgrep -A2 LC_ID_DYLIB
If the printed path already points to the dylib itself (or a path that is symlinked to it), use this path as [new_path] below, and skip step 2.
If the dylib's install name does not point back to itself, run this:
sudo install_name_tool -id /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib
And use /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib for [new_path] below.
For binaries that link against the dylib, run:
sudo install_name_tool -change /usr/lib/libpq.5.dylib [new_path] [path_to_binary]
I had the same issue building a container through docker for API use : RPostgres was installed but the library couldn't load, same error message.
Since I had installed Postgres on my machine, I figure the problem was worked around therefore I had no such message on local ; but here's how I solved this in my dockerfile, 100% verified on a machine with nothing related to R installed :
RUN apt-get update && apt-get install libpq5 -y
So executing apt-get update && apt-get install libpq5 -y on your terminal should do the trick. Light and efficient.
It tried to load libpq.5.dylib from the symlink /opt/homebrew/opt/postgresql/lib/libpq.5.dylib but could not find the file, so you need to update it:
# TODO: get this from the error, after "Library not loaded:"
SYMLINK_PATH="/opt/homebrew/opt/postgresql/lib/libpq.5.dylib"
# TODO: find this in your machine. The version maybe different than mine
DESTINATION_PATH="/opt/homebrew/opt/postgresql/lib/postgresql#14/libpq.5.dylib"
sudo mv $SYMLINK_PATH $SYMLINK_PATH.old
sudo ln -s $DESTINATION_PATH $SYMLINK_PATH

How to hide terminal warning when Oh-my-ZSH plugin can't access external app

I've been using oh-my-zsh for a while and it's working great. I'd like to use the command-line fuzzy finder plugin so I enabled it in .zshrc:
plugins=(fzf)
However if "fzf" is not installed I get a warning when opening my terminal window:
[oh-my-zsh] fzf plugin: Cannot find fzf installation directory.
Please add export FZF_BASE=/path/to/fzf/install/dir to your .zshrc
Is there a way to hide that warning message? When I install fzf with "sudo dnf install fzf" the warning dissapears, but maybe I want to clone my dotfiles on a different computer where it is not available and it's not that important to be there.
you should first install fzf, in Mac and i use the following command to install brew install fzf
You need to have fzf installed to use this plugin; otherwise remove it. It won't do anything without first installing fzf. Sudo apt install fzf
You can put the plugins= line inside an if statement that checks for the presence of fzf in your path. For example:
if [[ -n $(command -v fzf) ]] ; then
echo "fzf found, loading oh-my-zsh fzf plugin"
plugins=(vi-mode fzf)
else
echo "no fzf was found in the path"
plugins=(vi-mode)
fi
command -v is similar to which, but is superior for this context as explained in this answer.
The -n makes the [[ ]] evaluate as true whenever the $() produces a non-empty output.
For me, it was also very important that brew itself was in Path of ~/.zshenv like so:
export PATH=/opt/homebrew/bin:$PATH
Installed FZF with brew on an M1 Mac.
Otherwise, the error occurs:
[oh-my-zsh] fzf plugin: Cannot find fzf installation directory.
Please add `export FZF_BASE=/path/to/fzf/install/dir` to your .zshrc
When you install fzf by using brew, it needs to be set brew env.
You can solve to set PATH for fzf before the line of plugins=(fzf) in .zshrc file.
But, I recommand creating "$HOME/.zprofile" as following.
For m1 Mac.
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/opt/homebrew/bin/brew shellenv)"
For, intel Mac
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/usr/local/bin/brew shellenv)"

use conda skeleton to build an r bioconductor package

I know that its generally easier to install r packages, even within condas, using install packages, or similar. But I also know that I can usually build my own package with, for instance
conda skeleton cran tensorA
conda build r-tensorA
conda install --use-local r-tensorA
But what if the package lives in bioconda, rathaer than cran? DECIPHER, for instance can be installed within R by running
source("https://bioconductor.org/biocLite.R")
biocLite("DECIPHER")
For primarily learning purposes, I'd like to try to build DECIPHER (and other bioconductor packages) into a condas package. Can anyone point me in a good direction to do something like this? Or if you are really feeling awesome, ouline the steps one would take?
Ok. Here's how I managed to solve this:
I used conda skeleton files from another r-build as a template. It turns out, that for bioconductor packages here's an example, there is a link to the git repository under the heading Source Repository.
I found the following guide helpful here.
I ended up making a meta.yaml file that looks like this
package:
name: r-decipher
version: "2.6.0"
source:
git_url: https://git.bioconductor.org/packages/DECIPHER
requirements:
build:
- r
- bioconductor-biostrings
- r-rsqlite
run:
- r
- bioconductor-biostrings
- r-rsqlite
test:
test:
commands:
# You can put additional test commands to be run here.
- $R -e "library('DECIPHER')" # [not win]
- "\"%R%\" -e \"library('DECIPHER')\"" # [win]
about:
home: https://bioconductor.org/packages/release/bioc/html/DECIPHER.html
I also made a build.sh file that looks like the following:
#!/bin/bash
if [[ $target_platform =~ linux.* ]] || [[ $target_platform == win-32 ]] || [[ $target_platform == win-64 ]] || [[ $target_platform
== osx-64 ]]; then
export DISABLE_AUTOBREW=1
mv DESCRIPTION DESCRIPTION.old
grep -v '^Priority: ' DESCRIPTION.old > DESCRIPTION
$R CMD INSTALL --build .
else
mkdir -p $PREFIX/lib/R/library/decipher
mv * $PREFIX/lib/R/library/decipher
fi
And a bld.bat that looks like the following
"%R%" CMD INSTALL --build .
IF %ERRORLEVEL% NEQ 0 exit 1
All of these went in a source directory called r-decipher.
From the directory outside of that one I ran conda build, which worked (I may have had to install some dependencies, but it complains about them on the command line and each is available in CRAN at least) and then ran conda install r-decipher.
If anyone wants to use my specific build of r-decipher, it can now be found at https://anaconda.org/cramjaco/r-decipher

Installing Symfony on Mac OS X

I am having trouble installing this framework.
I entered this command on terminal as per the instructions on http://symfony.com/doc/current/quick_tour/the_big_picture.html. This was from the desktop.
$ php -r "readfile('http://symfony.com/installer');" > symfony.phar
The next part requires me to add this code:
$ sudo mv symfony.phar /usr/local/bin/symfony
Now I get this error:
mv: rename symfony.phar to /usr/local/bin/symfony: Not a directory
Please help me resolve this.
Try and move it to /usr/bin instead.
The directory you're trying to move it to doesn't exist. The instructions you're following may not be intended for OS X users.
The executable can go anywhere that's in your PATH.

Meteor.js installation failed

I wanted to install Meteor via
curl https://install.meteor.com | /bin/sh
like it's said in the documentation.
Every time I try this (also as sudo), I get this error:
**rmdir: /Users/christophz/.meteor-install-tmp: Directory not empty
Installation failed.**
The directory, of course, is empty before installation. After aborting the installation in my home folder there IS .meteor and still .meteor-install-tmp. But trying to create a new meteor app fails. My command line says it doesn't know this command.
I didn't find anything via Google. Can u help me and give me some hint?
Did you try rm -rf? With or without sudo:
rm -rf ~/.meteor-install-tmp
rm -rf ~/.meteor
Try deleting the directory. I think this happened to me once.

Resources