Facebook Duckling error getDirectoryContents:openDirStream: does not exist - haskell

i followed the following steps:
apt-get install haskell-platform
curl -sSL https://get.haskellstack.org/ | sh
git clone https://github.com/facebookincubator/duckling.git
stack setup
stack build
stack exec duckling-example-exe
and i get the following error any idea why?
duckling-example-exe: /usr/share/zoneinfo/: getDirectoryContents:openDirStream: does not exist (No such file or directory)

You might just need to apt-get install tzdata -- I was searching for where zoneinfo is supposed to come from, and I found reports that it was not installed by default anymore in Ubuntu 16.04. I don't see that it's a part of baseimage at all, so it's probably missing from your container.
from source

Related

Getting error while installing package in docker image

The beginning of this error is from creating and password based image in Azure environment. Below is the origin or this all. More info on this I just got to know we are using alpine based image.openjdk:8uX-alpine311
So I did googled a bit and found some package needs to be installed and to do that I need to execute below command.
RUN apt-get update; apt-get install -y fontconfig libfreetype6 which resulted me in
the command bin/sh sh returned a non zero code 127
After further analysis I found another solution to this is to run below query.
RUN apk add --update fontconfig libfreetype6 as result again came as
the command bin/sh sh returned a non zero code 2
I am wondering this is just some package installation on azure environment, what it takes every time change in command's. Any help appreciated, thanks in advance.
the command bin/sh sh returned a non zero code 127
Means the command wasn't found. Which is correct, since you're using an alpine image and apt-get is mostly found in debian based images. See also command '/bin/sh -c returned a non-zero code: 127
Testing your command on an local alpine:3.11 image I can verify that the command fails when trying to install libfreetype6
Try RUN apk add --update fontconfig freetype
You can verify if a package is available by checking pkgs.alpinelinux.org

How to install and run Tacotron2 on Ubuntu WSL?

I am running Ubuntu 20.04 on WSL Windows 10 Pro 2004 (19041.388), and I am very much wanting to run Tacotron2 and try out the functionality. I have installed Tacotron2 from git via command-line, but I'm uncertain whether it built successfully. I am a beginner with Linux and Docker, and the install instructions from above-linked Tacotron2 seems confusing.
So here is where I am at:
Installed Docker, confirmed up and running, all good.
Downloaded Tacotron2 via git cmd-line - success.
Executed this command: sudo docker build -t tacotron-2_image -f docker/Dockerfile docker/ - a lot of stuff happened that seemed successful, but at the end, there was an error:
Package libav-tools is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it:
ffmpeg
E: Package 'libav-tools' has no installation candidate The command '/bin/bash -c apt-get install -y libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg libav-tools wget git vim'
returned a non-zero code: 100
At this point I am stuck. It's true that I'm looking to get unstuck on this error, but comprehensively I'm looking for exact steps to be able to run Tacotron2 and ultimately be able to feed it an mp3 file with someone's voice, and then be able to feed it some text, which it will then "speak" in that voice.
That is my understanding of what Tacotron2 is, but I am keen to know if I am going down the wrong path.
Your issue looks quite similar to https://github.com/Rayhane-mamah/Tacotron-2/issues/475
The issue happens because you have libav-tools installation directives in your Dockerfile which is no longer has installation candidates.
To eliminate the error you need to open docker/Dockerfile in any text editor and remove libav-tools from the line that contains
apt-get install -y libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg libav-tools wget git vim
to have something like
apt-get install -y libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg wget git vim
Since package ffmpeg already in this list you don't need to add it again.
You can also remove libav-tools from the Dockerfile using sed command in the WSL shell (might need to add sudo before sed if you have error with permissions):
sed -i docker/Dockerfile -e 's/libav-tools\ //g'
Then your build command should pass.

How do I install Haskell Stack on Mac?

I have followed the instructions to install ghcup on my MacOS by following command:
curl https://get-ghcup.haskell.org -sSf | sh
But I couldn't install it, it prompted errors like these:
Failed to install, consider updating this script via: ghcup upgrade
"ghcup --cache install" failed!
stack and ghcup are two different tools.
You can get stack from this website, which involves running the following command:
curl -sSL https://get.haskellstack.org/ | sh
On the other hand, ghcup is a tool that only installs the Haskell compiler (GHC), which means that you won't be able to build a project using Stack. Note that this last installation comes with a build tool called cabal. You can learn the differences between stack and cabal in this other question.
Regarding your error with ghcup, I'd try to use the instructions from https://gitlab.haskell.org/haskell/ghcup. It is the main repo from the project, and probably updated faster. Note that you can use the "simple bootstrap" process, and if that doesn't work, try the manual one.
If you have brew installed, you can use : brew install stack

Installing/Linking libwebsockets library in AWS Linux for mosquitto MQTT

Following the AWS Guide: https://aws.amazon.com/blogs/iot/how-to-bridge-mosquitto-mqtt-broker-to-aws-iot/ and I got to the step that has me install mosquitto.
//Update the list of repositories with one containing Mosquitto
sudo wget http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7/home:oojah:mqtt.repo -O /etc/yum.repos.d/mqtt.repo
//Install Mosquitto broker and Mosquitto command line tools
sudo yum install mosquitto mosquitto-clients
However, the guide is so outdated that it does not mention anything about the missing libwebsockets library. I've spent roughly 4-5 hours on searching for an answer on how to manually install/link/setup the library but I have not been able to make anything work.
(1) Tried this
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc
make
sudo make install
But yea that didn't work because CMAKE throws all kinds of errors like
CMake Error at /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:99 (message): Could not find toolchain file: /tmp/mytoolchainfile
Call Stack (most recent call first):
CMakeLists.txt:131 (project)
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file: /tmp/libwebsockets/build/CMakeFiles/2.8.12.2/CMakeCCompiler.cmake
-- Configuring incomplete, errors occurred!
So I tried to set the CMAKE_C_COMPILER path to /usr/bin/gcc, which is where the compiler is installed and that didn't do anything either. In all honesty, I'm not super familiar with Linux, I'm just trying to make do the best I can. I could really use some guidance on how best to get library installed and linked into Linux. I do believe AWS runs a red-hat version of linux.
Thanks for your time!
I had this working using aws linux 2
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -P /tmp
sudo yum install -y /tmp/epel-release-latest-7.noarch.rpm
sudo yum install libwebsockets
sudo yum install mosquitto mosquitto-clients

Docker upgrades failing due to conflicts

I am attempting to upgrade Docker on CentOS 7 from 1.9 to 1.10. I am using the script provided on the Docker website:
https://docs.docker.com/engine/installation/linux/centos/
I am running the script:
curl -fsSL https://get.docker.com/ | sh
Eventually, the script executes the following command:
sudo -E sh -c 'sleep 3; yum -y -q install docker-engine'
This command is failing with the following message:
Error: docker-engine-selinux conflicts with docker-selinux-1.9.1-25.el7.centos.x86_64
Error: docker-engine conflicts with docker-1.9.1-25.el7.centos.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I have isolated this failure to the yum command, and attempted to run it using the --skip-broken. This doesn't do much, though:
$ sudo yum -y -q --skip-broken install docker-engine
Packages skipped because of dependency problems:
docker-engine-1.10.3-1.el7.centos.x86_64 from docker-main-repo
docker-engine-selinux-1.10.3-1.el7.centos.noarch from docker-main-repo
Trying the rpm command does nothing. Running the referenced rpm command seems to do something, but whatever it does it has no effect on the install. The failure persists.
Internet searches have revealed that others have seen similar problems, but usually their problems come because some dependency, referenced in the failure, was missing. There don't appear to be any missing dependencies on my system.
I even tried removing version 1.9. That does not change anything either.
Following the instructions for a manual install provided on the docker site hasn't changed anything, either.
There is also nothing in the Docker documentation that describes this particular problem.
Has anyone seen this exact problem before? Does anyone know some way to fix it???
Please advise.
From this message:
docker-engine-selinux conflicts with docker-selinux
I suspect you previously had the Red Hat distributed version of Docker installed, which installs docker-selinux. The official Docker packages also install a similar package (docker-engine-selinux) and that conflicts with the package you already have installed.
The best approach would be to uninstall the existing docker version (including the docker-selinux package), and then install docker-engine, following the instructions in the documentation; https://docs.docker.com/engine/installation/linux/centos/

Resources