rsyslog inside docker containers => "rsyslogd is not running ... failed" - docker

I am running rsyslog within docker containers to send UDP messages to logstash.
When I log into the docker container, and type:
service rsyslog status
shows:
rsyslogd is not running ... failed!
However, while I am in the container, if I type:
service rsyslog start
It starts up perfectly with no errors and no real sign of why it failed at the start
I CAN NOT FIGURE OUT WHY IT IS FAILING!!!!
*The rsyslog conf file has not been modified except the Modules to allow for imfile. The rsyslog.conf is as follows:
# /etc/rsyslog.conf Configuration file for rsyslog.
#
# For more information see
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#################
#### MODULES ####
#################
module(load="imfile" PollingInterval="10")
module(load="imuxsock" ) # provides support for local system logging
module(load="immark") #provides --MARK-- message capability
###########################
#### GLOBAL DIRECTIVES ####
###########################
#
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
#
# Set the default permissions for all log files.
#
$FileOwner root
$FileGroup adm
$FileCreateMode 0644
$DirCreateMode 0755
$Umask 0022
#
# Where to place spool and state files
#
$WorkDirectory /var/spool/rsyslog
#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
###############
#### RULES ####
###############
#
# First some standard log files. Log by facility.
#
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
#cron.* /var/log/cron.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
#
# Logging for the mail system. Split it up so that
# it is easy to write scripts to parse these files.
#
mail.info -/var/log/mail.info
mail.warn -/var/log/mail.warn
mail.err /var/log/mail.err
#
# Logging for INN news system.
#
news.crit /var/log/news/news.crit
news.err /var/log/news/news.err
news.notice -/var/log/news/news.notice
#
# Some "catch-all" log files.
#
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages
#
# Emergencies are sent to everybody logged in.
#
*.emerg :omusrmsg:*
#
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#
#daemon,mail.*;\
# news.=crit;news.=err;news.=notice;\
# *.=debug;*.=info;\
# *.=notice;*.=warn /dev/tty8
# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
# you must invoke `xconsole' with the `-file' option:
#
# $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
# busy site..
#
daemon.*;mail.*;\
news.err;\
*.=debug;*.=info;\
*.=notice;*.=warn |/dev/xconsole
*I have a script file that starts rsyslog
if [[ -z "$(pgrep rsyslog)" ]]; then
echo "starting rsyslog"
service rsyslog start
fi
My conf file is as follows:
##Get Nginx Error Logs
$InputFileName /var/log/nginx/error.log
$InputFileTag http-error
$InputFileStateFile stat-nginx-error
$InputFileSeverity error
$InputFileFacility local7
$InputRunFileMonitor
#GRAB PHP-FPM ACCESS LOGS
$InputFileName /var/log/php-fpm/access_log
$InputFileTag php-fpm-access
$InputFileStateFile stat-php-fpm-access
$InputFileSeverity info
$InputFileFacility local7
$InputRunFileMonitor
#GRAB PHP-FPM ERROR LOGS
$InputFileName /var/log/php-fpm/error_log
$InputFileTag php-fpm-error
$InputFileStateFile stat-php-fpm-error
$InputFileSeverity error
$InputFileFacility local7
$InputRunFileMonitor
#Json Template
template(name="json_temp" type="list")
{ constant(value="{")
constant(value="\"#timestamp\":\"") property(name="timegenerated" dateFormat="rfc3339")
constant(value="\",\"message\":\"") property(name="msg")
constant(value="\",\"severity_label\":\"") property(name="syslogseverity-text")
constant(value="\",\"severity\":\"") property(name="syslogseverity")
constant(value="\",\"facility_label\":\"") property(name="syslogfacility-text")
constant(value="\",\"facility\":\"") property(name="syslogfacility")
constant(value="\",\"program\":\"") property(name="programname")
constant(value="\",\"pid\":\"") property(name="procid")
constant(value="\",\"rawmsg\":\"") property(name="rawmsg")
constant(value="\",\"syslogtag\":\"") property(name="syslogtag")
constant(value="\"}\n")
}
if $programname == 'http-error' then #ip.address:port;json_temp
if $programname == 'http-error' then stop
if $programname == 'php-fpm-access' then #ip.address:port;json_temp
if $programname == 'php-fpm-access' then stop
if $programname == 'php-fpm-error' then #ip.address:port;json_temp
if $programname == 'php-fpm-error' then stop
*.* #ip.address:port;json_temp
Any help would be awesome because I do not understand why it is not starting up.
Cheers

We bumped upon the same issue on a Docker 17.03.2-ce image created on CentOS 7.3.1611. The solution is in verifying /etc/rsyslog.conf as per this documentation. Basically, in /etc/rsyslog.conf:
Remove $ModLoad imjournal
Set $OmitLocalLogging to off
Make sure $ModLoad imuxsock is present
Comment out: $IMJournalStateFile imjournal.state
Finally, note that running the rsyslogd or anything else, is the responsibility of the program that is being run inside the container. It is not going to get launched, automatically.

This is my rsyslog.conf in docker container(centos7):
$> cat /etc/rsyslog.conf |grep -vE '^$|^#'
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$WorkDirectory /var/lib/rsyslog
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$IncludeConfig /etc/rsyslog.d/*.conf
$OmitLocalLogging off
*.info;mail.none;authpriv.none;cron.none /var/log/messages
authpriv.* /var/log/secure
mail.* -/var/log/maillog
cron.* /var/log/cron
*.emerg :omusrmsg:*
uucp,news.crit /var/log/spooler
local7.* /var/log/boot.log
Also i changed /etc/rsyslog.d/listen.conf
#$SystemLogSocketName /run/systemd/journal/syslog
And then
$> rsyslogd -n
Thanks #elinax
More info at https://www.projectatomic.io/blog/2014/09/running-syslog-within-a-docker-container/

Add this line in file entrypoint.sh:
sudo service rsyslog start

Related

WSO2 EI 6.5.0 - admin password reset using chpasswd.bat due to a UserStoreException

I am trying to reset admin user password by using chpasswd.bat as forgot my old password in WSO2 EI 6.5.0 by follows this link
OS: windows 10
prerequisite:
Apache Ant 1.10.7 has been installed in my machine.
environment variable set done.
Since i am using default H2 Database, Copied related H2 JDBC driver into <PRODUCT_HOME>/lib/
goto product path <PRODUCT_HOME>/bin/ and execute below command
chpasswd.bat --db-driver "org.h2.Driver" --db-url "jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000" --db-username "wso2carbon" --db-password "wso2carbon" --username "admin" --new-password "newadmin"
after executing above command getting below log
C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\bin>chpasswd.bat --db-url "jdbc:h2:$CARBON_HOME\repsitory\database\WSO2CARBON_DB"
Buildfile: C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\bin\build.xml
setup:
[copy] Copying 40 files to C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\lib
[mkdir] Created dir: C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\tmp\setup
[unzip] Expanding: C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\components\plugins\org.wso2.carbon.security.mgt.stub_5.12.387.jar into C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\tmp\setup
[unzip] Expanding: C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\components\plugins\org.wso2.carbon.security.mgt.ui_5.12.387.jar into C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\tmp\setup
[unzip] Expanding: C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\components\plugins\org.wso2.carbon.security.mgt_5.12.387.jar into C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\tmp\setup
[delete] Deleting directory C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\tmp\setup
[unzip] Expanding: C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\components\plugins\h2_1.3.175.wso2v1.jar into C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\lib
[unzip] Expanding: C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\components\plugins\org.wso2.carbon.utils_4.4.40.jar into C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\lib
[move] Moving 91 files to C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\lib
[delete] Deleting directory C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\lib\META-INF
[delete] Deleting directory C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\wso2\lib\org
BUILD SUCCESSFUL
Total time: 15 seconds
Username: admin
New password: in
Re-enter new password: in
log4j:WARN Error during default initialization
java.lang.NoClassDefFoundError: org/wso2/carbon/bootstrap/logging/LoggingBridge
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:785)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:262)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1025)
at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:844)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:541)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:269)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
at org.wso2.carbon.user.core.config.RealmConfigXMLProcessor.<clinit>(RealmConfigXMLProcessor.java:56)
at org.wso2.carbon.core.util.PasswordUpdater.run(PasswordUpdater.java:158)
at org.wso2.carbon.core.util.PasswordUpdater.main(PasswordUpdater.java:48)
Caused by: java.lang.ClassNotFoundException: org.wso2.carbon.bootstrap.logging.LoggingBridge
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 40 more
Error updating credentials for user wso2admin : org.wso2.carbon.user.core.UserStoreException: Error while reading realm configuration from file
C:\Development_Avecto\WSo2EIServers\wso2ei-6.5.0\wso2ei-6.5.0\bin>
some Jar called ant-contrib-1.0b3 placed after getting above error inside apache-ant-1.10.7\lib path
Is there any config i missed? or how to run that chpasswd command in windows 10 to reset password ?
I was able to fix this issue for EI 6.5.0. If you have WSO2 subscription try updating the product. If not follow the instructions below.
Note: I did not have a Windows environment to test hence I fixed this for a Linux environment. You can do a diff between the following file and include the required fixed in the bat file.
Copy the org.wso2.carbon.bootstrap-4.5.3.jar to the ${EI_HOME}/wso2/lib directory. This will get rid of the NoClassDefFoundError issue.
Then update the chpasswd.sh with the following content.
#!/bin/sh
# ----------------------------------------------------------------------------
# Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------------------
#
# Environment Variable Prequisites
#
# CARBON_HOME Home of CARBON installation. If not set I will try
# to figure it out.
#
# JAVA_HOME Must point at your Java Development Kit installation.
#
# NOTE: Borrowed generously from Apache Tomcat startup scripts.
# if JAVA_HOME is not set we're not happy
if [ -z "$JAVA_HOME" ]; then
echo "You must set the JAVA_HOME variable before running chpasswd."
exit 1
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
os400=false
case "`uname`" in
CYGWIN*) cygwin=true;;
OS400*) os400=true;;
esac
# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
# Get standard environment variables
PRGDIR=`dirname "$PRG"`
# Only set CARBON_HOME if not already set
[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd`
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For OS400
if $os400; then
# Set job priority to standard for interactive (interactive - 6) by using
# the interactive priority - 6, the helper threads that respond to requests
# will be running at the same priority as interactive jobs.
COMMAND='chgjob job('$JOBNAME') runpty(6)'
system $COMMAND
# Enable multi threading
QIBM_MULTI_THREADED=Y
export QIBM_MULTI_THREADED
fi
ant -buildfile "$CARBON_HOME"/bin/build.xml
# update classpath
CARBON_CLASSPATH=""
for f in "$CARBON_HOME"/wso2/lib/*.jar
do
CARBON_CLASSPATH=$CARBON_CLASSPATH:$f
done
for g in "$CARBON_HOME"/repository/lib/*.jar
do
CARBON_CLASSPATH=$CARBON_CLASSPATH:$g
done
for h in "$CARBON_HOME"/wso2/lib/api/*.jar
do
CARBON_CLASSPATH=$CARBON_CLASSPATH:$h
done
for i in "$CARBON_HOME"/bin/*.jar
do
CARBON_CLASSPATH=$CARBON_CLASSPATH:$i
done
CARBON_CLASSPATH=$CARBON_CLASSPATH:$CLASSPATH
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
fi
# ----- Execute The Requested Command -----------------------------------------
cd "$CARBON_HOME"
CARBON_CLASSPATH="$CARBON_HOME/lib/patches":"$CARBON_HOME/conf":$CARBON_CLASSPATH
$JAVA_HOME/bin/java -Dcarbon.config.dir.path="$CARBON_HOME/conf" -cp "$CARBON_CLASSPATH" org.wso2.carbon.core.util.PasswordUpdater $*
Also note that you do not have to copy any additional drivers for H2 DB access as the product already have the driver installed. Also I observed a issue with your database URL. Refer the following command and fix your command accordingly.
sh chpasswd.sh --db-driver "org.h2.Driver" --db-url "jdbc:h2:../repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000" --db-username "wso2carbon" --db-password "wso2carbon" --username "admin" --new-password "newadmin"
References: https://github.com/wso2/micro-integrator/commit/0754a7130eacf88dccc960e92227f2c5635a63de

Why do I keep getting this error message in buildozer even tho I installed every single thing it needs?

I made a simple python app using kivy and when I wanted to convert it to apk using buildozer it kept giving me this error. I searched everywhere but couldn't find any solution. Do you guys have any idea ?
(stackoverflow is asking me to provide more details so don't mind this line. Below is the output I get when running the buildozer -v android debug command.)
root#DESKTOP-VQBOS27:/home/dtomper/environments/Tests/app test# buildozer -v android debug
# Check configuration tokens
Buildozer is running as root!
This is not recommended, and may lead to problems later.
Are you sure you want to continue [y/n]? y
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.19.7 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /usr/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run 'git config --get remote.origin.url'
# Cwd /home/dtomper/environments/Tests/app test/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
# Run 'git branch -vv'
# Cwd /home/dtomper/environments/Tests/app test/.buildozer/android/platform/python-for-android
* master 5a94d074 [origin/master] Merge pull request #2244 from Chronolife-team/native_services_upstream
# Run '/usr/bin/python3 -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\' \'pep517<0.7.0"\' \'toml\''
# Cwd None
# Apache ANT found at /root/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /root/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 19c
# Android NDK found at /root/.buildozer/android/platform/android-ndk-r19c
# Check application requirements
# Compile platform
# Run '/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/dtomper/environments/Tests/app test/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21 --ignore-setup-py'
# Cwd /home/dtomper/environments/Tests/app test/.buildozer/android/platform/python-for-android
/home/dtomper/environments/Tests/app test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py:84: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/dtomper/environments/Tests/app test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module>
main()
File "/home/dtomper/environments/Tests/app test/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/dtomper/environments/Tests/app test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 694, in __init__
self.ctx.setup_dirs(self.storage_dir)
File "/home/dtomper/environments/Tests/app test/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 173, in setup_dirs
raise ValueError('storage dir path cannot contain spaces, please '
ValueError: storage dir path cannot contain spaces, please specify a path with --storage-dir
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/dtomper/environments/Tests/app test/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21 --ignore-setup-py
# ENVIRONMENT:
# SHELL = '/bin/bash'
# SUDO_GID = '1000'
# SUDO_COMMAND = '/usr/bin/bash'
# SUDO_USER = 'dtomper'
# PWD = '/home/dtomper/environments/Tests/app test'
# LOGNAME = 'root'
# HOME = '/root'
# LANG = 'C.UTF-8'
# LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
# LESSCLOSE = '/usr/bin/lesspipe %s %s'
# TERM = 'xterm-256color'
# LESSOPEN = '| /usr/bin/lesspipe %s'
# USER = 'root'
# SHLVL = '1'
# PS1 = '\\[\\e]0;\\u#\\h: \\w\\a\\]${debian_chroot:+($debian_chroot)}\\u#\\h:\\w\\$ '
# PATH = '/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin'
# SUDO_UID = '1000'
# MAIL = '/var/mail/root'
# _ = '/usr/local/bin/buildozer'
# OLDPWD = '/home/dtomper/environments/Tests'
# PACKAGES_PATH = '/root/.buildozer/android/packages'
# ANDROIDSDK = '/root/.buildozer/android/platform/android-sdk'
# ANDROIDNDK = '/root/.buildozer/android/platform/android-ndk-r19c'
# ANDROIDAPI = '27'
# ANDROIDMINAPI = '21'
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
ValueError: storage dir path cannot contain spaces, please specify a path with --storage-dir
As it says, try using a directory without spaces in its name.

Why is there ```No value provided for required arguments 'app_path'``` when I try to create a rails app?

(this is my first post, sorry if i make a mistake),
In Iterm2 I put :
rails _5.2.3_ new -d postgresql
And the terminal answers:
No value provided for required arguments 'app_path'
I opened the .zshrc file and tried to figure out if the problem comes from this file and searched for the keyword PATHbut couldn't figure out if a path is wrong or not. Does the problem is on the .zshrc file ? Where is the problem and how to solve it ?
Here is my .zshrc file
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/thibaultguichard/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="simple"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
bundler
dotenv
osx
rake
rbenv
ruby
zsh-syntax-highlighting
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
# export PATH="$PATH:$HOME/.rvm/bin"
# SYSTEM ALIAS
alias cls='clear' # Clear the terminal
alias c='clear' # Clear the terminal
alias h='history' # Print bash command history
alias ll='ls -l' # List files in a list
alias la='ls -al' # List files in a list with hidden files
# GIT ALIAS
alias gitalias='alias | grep git' # Show all alias for git (if you have OH MY ZSH you have lots of other aliases)
alias gs='git status' # Show the working tree status
alias gcl='git clone' # Clone a repository into a new directory
alias gpush='git push' # Update remote refs along with associated objects
alias gpull='git pull' # Fetch from and integrate with another repository or a local branch
alias ga='git add' # Add file contents to the index
alias gcm='git commit -m' # Record changes to the repository
alias gco='git checkout' # Switch branches or restore working tree files
alias gbr='git branch' # List, create, or delete branches
alias glog='git log' # Show commit logs
alias greset='git reset' # Reset current HEAD to the specified state
# BUNDLE ALIAS
alias bundlealias='alias | grep bundle' # Show all alias for bundle
alias bi='bundle install' # Install the current environment to the system
alias bl='bundle list' # List all gem in GEMFILE and version
alias bu='bundle update' # Update the current environment (update gem)
alias ba='bundle add' # Command for add multiple gem in gemfile and launch a bundle update
# HEROKU ALIAS
alias herokualias='alias | grep heroku' # Show all alias for Heroku
alias hrdbs='heroku run rake db:seed'
alias hrdbm='heroku run rails db:migrate'
alias hrc='heroku create'
alias hrrc='heroku run rails console'
alias hrbi='heroku run bundle install'
alias hrupdate='heroku update' # Update the Heroku CLI
alias hrpsql='heroku psql' # Open a psql shell to the database
alias hrlogs='heroku logs' # Display recent log output
alias hrlog='heroku logs' # Display recent log output
# APT ALIAS
alias aptalias='alias | grep apt' # show all alias for apt
alias update='sudo apt update -y' # Update list of available packages
alias upgrade='sudo apt upgrade -y' # Upgrade the system by installing/upgrading packages
alias full-upgrade='sudo apt full-upgrade -y' # Upgrade the system by removing/installing/upgrading packages
alias dist-upgrade='sudo apt dist-upgrade -y' # Upgrade your distributtion system with sudo and ask yes
alias autoremove='sudo apt autoremove' # Remove automatically all unused packages
# RAILS ALIAS
alias railsalias='alias | grep rails' # Show all alias for rails
### RAILS CREATION
alias nr='rails _5.2.3_ new'
alias nrp='rails _5.2.3_ new -d postgresql'
### RAILS OTHER
alias rc='rails console'
alias rd='rails destroy'
alias rp='rails plugin'
alias ru='rails runner'
alias rs='rails server'
alias rsd='rails server --debugger'
alias rr='rails routes'
### RAILS GENERATE
alias rg='rails generate'
alias rgmigration='rails generate migration'
alias rgmodel='rails generate model'
alias rgscaffold='rails generate scaffold'
alias rgc='rails generate controller'
### RAILS DATABASE
alias rdb='rails dbconsole' # Database console in the database of your Rails APP
alias rdbd='rails db:drop'
alias rdbc='rails db:create'
alias rdbs='rails db:seed'
alias rdbm='rails db:migrate'
alias rdbms='rails db:migrate status'
alias rdbr='rails db:rollback'
#OTHERS ALIAS
alias path='echo -e ${PATH//:/\\n}' # Print all PATH environnement in a list
alias now='date +"%T"' # Get the time now
alias nowdate='date +"%d-%m-%Y"' # Get the Date
alias vi='vim'
alias svim='sudo vim' # Launch Vim with sudo
alias edit='vim'
You don't specify a name for your new project.
Try with rails _5.2.3_ new NameOfTheApp -d postgresql
It should work. (:

freebsd ignores service startup

I installed 3proxy on freebsd(11.2-RELEASE-p10-HBSD FreeBSD ) which is whith opnsense from ports, but I cannot autoload it after restart
service 3proxy start - works nice
I make /usr/local/etc/rc.d/3proxy
-rwxr-xr-x 1 root wheel 653 Feb 26 20:35 3proxy
#!/bin/sh
# $FreeBSD: head/net/3proxy/files/3proxy.in 340872 2014-01-24 00:14:07Z mat $
# PROVIDE: threeproxy
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
# Define these threeproxy_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/threeproxy
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
threeproxy_enable=${threeproxy_enable-"NO"}
threeproxy_flags=${threeproxy_flags-"/usr/local/etc/3proxy.cfg"}
. /etc/rc.subr
name="threeproxy"
rcvar=threeproxy_enable
command="/usr/local/bin/3proxy"
load_rc_config $name
start_cmd="echo \"Starting ${name}.\"; ${command} ${threeproxy_flags} &"
run_rc_command "$1"
then added line here /etc/rc.conf
threeproxy_enable="YES"
But after restart I also see that service is down - how can I do this?
I also thought about crontab and #reboot.
Please help me

Installing more than one version of Erlang/OTP on a machine

Is this possible to have different versions of Erlang/OTP installed simultaneously on the same platform?
I use Kerl to install Erlang on my machines. Quite easy to use, and allows to have several Erlang systems installed on same machine. You can then easily choose the one you want to use.
It is no only possible, but also very frequent. On my machine I have one version that I installed for development (R13B03) it is the default version when I launch erl.
A second copy of the same version associated with nitrogen. this copy is used when I start my nitrogen website. The version will not change when I will use the R16B.. for development
A partial older version which came with the installation of Wings3D.
Yes, I usually install different versions in my home directory. I build them from source:
./configure --prefix=$HOME/r15b01
make && make install
Then I can choose a version to use with PATH=$HOME/r15b01/bin:$PATH, and compile and run things as usual.
These days I use asdf for this. Install asdf and add the relevant line to your .bashrc, and then run:
asdf plugin add erlang
asdf install erlang 22.3.3
asdf install erlang 23.0.2
Then you can set one of the Erlang versions you just built as the default version:
asdf global erlang 23.0.2
Or you can set it to be used in the current directory and its subdirectories - this will create a .tool-versions file in the current directory:
asdf local erlang 22.3.3
On a Mac, Macport helps switching, even between versions it covers and newer ones.
E.g. with Erlang 17 installed directly from Erlang Solutions, you could switch back to RB1603 (open a new terminal window afterwards):
sudo port activate erlang #R16B03-1_0+hipe+ssl
Switch back to Erlang 17 by _de_activating the Macports install (and open a new terminal window afterwards):
sudo port deactivate erlang #R16B03-1_0+hipe+ssl
List all versions you have installed with:
port installed erlang
Using the Nix package manager there is no need to globally install interpreters (especially because sometimes multiple versions are needed), and nix-shell will open up a sub-shell with the Erlang executable available in the path.
1. Getting only the Erlang (no shell.nix)
For the current version in the active channel:
nix-shell -p erlang
For other versions not in the current channel, a specific channel can be given:
nix-shell -I nixpkgs=channel:nixos-unstable -p erlangR22
Or add path to the Nix expression in your NixOS/nixpkgs clone:
$ nix-shell -I nixpkgs=~/clones/nixpkgs -p erlangR23
2. More elaborate project setup configurations: use a shell.nix file
A complex development environment can be spun up, and calling nix-shell shell.nix will take care of all - even automatically when entering a directory if set up with direnv(archived).
2.1 Examples
Erlang
This will drop you in a shell with erl and rebar3 available, along with the other programs specified in buildInputs.
{ pkgs ? import ~/clones/nixpkgs {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
beam.packages.erlangR22.erlang
beam.packages.erlangR22.rebar3
curl
ffmpeg
git
google-cloud-sdk
jq
];
# Where would be the best place for this?
shellHook = ''
export ERL_AFLAGS="-kernel shell_history enabled"
'';
Elixir/Phoenix web project
This (archived) will set up an environment for an Elixir/Phoenix web app complete with a spun up PostgreSQL dev instance:
####################################################################
# Importing a cloned Nixpkgs repo (from my home directory), because
# the latest channels don't have Elixir 1.9.
# See https://nixos.org/nix/manual/#idm140737317975776 for the meaning
# of `<nixpkgs>` and `~` in Nix expressions (towards the end of that
# section).
####################################################################
{ pkgs ? import ~/clones/nixpkgs {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
beam.packages.erlangR22.elixir_1_9
postgresql_11
nodejs-12_x
git
inotify-tools
];
shellHook = ''
####################################################################
# Create a diretory for the generated artifacts
####################################################################
mkdir .nix-shell
export NIX_SHELL_DIR=$PWD/.nix-shell
####################################################################
# Put the PostgreSQL databases in the project diretory.
####################################################################
export PGDATA=$NIX_SHELL_DIR/db
####################################################################
# Put any Mix-related data in the project directory
####################################################################
export MIX_HOME="$NIX_SHELL_DIR/.mix"
export MIX_ARCHIVES="$MIX_HOME/archives"
####################################################################
# Clean up after exiting the Nix shell using `trap`.
# ------------------------------------------------------------------
# Idea taken from
# https://unix.stackexchange.com/questions/464106/killing-background-processes-started-in-nix-shell
# and the answer provides a way more sophisticated solution.
#
# The main syntax is `trap ARG SIGNAL` where ARG are the commands to
# be executed when SIGNAL crops up. See `trap --help` for more.
####################################################################
trap \
"
######################################################
# Stop PostgreSQL
######################################################
pg_ctl -D $PGDATA stop
######################################################
# Delete `.nix-shell` directory
# ----------------------------------
# The first step is going back to the project root,
# otherwise `.nix-shell` won't get deleted. At least
# it didn't for me when exiting in a subdirectory.
######################################################
cd $PWD
rm -rf $NIX_SHELL_DIR
" \
EXIT
####################################################################
# If database is not initialized (i.e., $PGDATA directory does not
# exist), then set it up. Seems superfulous given the cleanup step
# above, but handy when one gets to force reboot the iron.
####################################################################
if ! test -d $PGDATA
then
######################################################
# Init PostgreSQL
######################################################
pg_ctl initdb -D $PGDATA
######################################################
# PORT ALREADY IN USE
######################################################
# If another `nix-shell` is running with a PostgreSQL
# instance, the logs will show complaints that the
# default port 5432 is already in use. Edit the line
# below with a different port number, uncomment it,
# and try again.
######################################################
# sed -i "s|^#port.*$|port = 5433|" $PGDATA/postgresql.conf
fi
####################################################################
# Start PostgreSQL
# ==================================================================
# Setting all necessary configuration options via `pg_ctl` (which
# is basically a wrapper around `postgres`) instead of editing
# `postgresql.conf` directly with `sed`. See docs:
#
# + https://www.postgresql.org/docs/current/app-pg-ctl.html
# + https://www.postgresql.org/docs/current/app-postgres.html
#
# See more on the caveats at
# https://discourse.nixos.org/t/how-to-configure-postgresql-declaratively-nixos-and-non-nixos/4063/1
# but recapping out of paranoia:
#
# > use `SHOW` commands to check the options because `postgres -C`
# > "_returns values from postgresql.conf_" (which is not changed by
# > supplying the configuration options on the command line) and
# > "_it does not reflect parameters supplied when the cluster was
# > started._"
#
# OPTION SUMMARY
# --------------------------------------------------------------------
#
# + `unix_socket_directories`
#
# > PostgreSQL will attempt to create a pidfile in
# > `/run/postgresql` by default, but it will fail as it
# > doesn't exist. By changing the configuration option
# > below, it will get created in $PGDATA.
#
# + `listen_addresses`
#
# > In tandem with edits in `pg_hba.conf` (see
# > `HOST_COMMON` below), it configures PostgreSQL to
# > allow remote connections (otherwise only `localhost`
# > will get authenticated and the rest of the traffic
# > discarded).
# >
# > NOTE: the edit to `pga_hba.conf` needs to come
# > **before** `pg_ctl start` (or the service
# > needs to be restarted otherwise), because then
# > the changes are not being reloaded.
# >
# > More info on setting up and troubleshooting remote
# > PosgreSQL connections (these are all mirrors of the
# > same text; again, paranoia):
# >
# > + https://stackoverflow.com/questions/24504680/connect-to-postgres-server-on-google-compute-engine
# > + https://stackoverflow.com/questions/47794979/connecting-to-postgres-server-on-google-compute-engine
# > + https://medium.com/scientific-breakthrough-of-the-afternoon/configure-postgresql-to-allow-remote-connections-af5a1a392a38
# > + https://gist.github.com/toraritte/f8c7fe001365c50294adfe8509080201#file-configure-postgres-to-allow-remote-connection-md
HOST_COMMON="host\s\+all\s\+all"
sed -i "s|^$HOST_COMMON.*127.*$|host all all 0.0.0.0/0 trust|" $PGDATA/pg_hba.conf
sed -i "s|^$HOST_COMMON.*::1.*$|host all all ::/0 trust|" $PGDATA/pg_hba.conf
# + `log*`
#
# > Setting up basic logging, to see remote connections
# > for example.
# >
# > See the docs for more:
# > https://www.postgresql.org/docs/current/runtime-config-logging.html
pg_ctl \
-D $PGDATA \
-l $PGDATA/postgres.log \
-o "-c unix_socket_directories='$PGDATA'" \
-o "-c listen_addresses='*'" \
-o "-c log_destination='stderr'" \
-o "-c logging_collector=on" \
-o "-c log_directory='log'" \
-o "-c log_filename='postgresql-%Y-%m-%d_%H%M%S.log'" \
-o "-c log_min_messages=info" \
-o "-c log_min_error_statement=info" \
-o "-c log_connections=on" \
start
####################################################################
# Install Node.js dependencies if not done yet.
####################################################################
if test -d "$PWD/assets/" && ! test -d "$PWD/assets/node_modules/"
then
(cd assets && npm install)
fi
####################################################################
# If $MIX_HOME doesn't exist, set it up.
####################################################################
if ! test -d $MIX_HOME
then
######################################################
# ... but first, test whether there is a `_backup`
# directory. Had issues with installing Hex on NixOS,
# and Hex and Phoenix can be copied from there, just
# in case.
######################################################
if test -d "$PWD/_backup"
then
cp -r _backup/.mix .nix-shell/
else
######################################################
# Install Hex and Phoenix via the network
######################################################
yes | mix local.hex
yes | mix archive.install hex phx_new
fi
fi
if test -f "mix.exs"
then
# These are not in the `if` section above, because of
# the `hex` install glitch, it could be that there is
# already a `$MIX_HOME` folder. See 2019-08-05_0553
mix deps.get
######################################################
# `ecto.setup` is defined in `mix.exs` by default when
# Phoenix project is generated via `mix phx.new`.
# It does `ecto.create`, `ecto.migrate`, and run
# `priv/seeds`.
######################################################
mix ecto.setup
fi
'';
####################################################################
# Without this, almost everything fails with locale issues when
# using `nix-shell --pure` (at least on NixOS).
# See
# + https://github.com/NixOS/nix/issues/318#issuecomment-52986702
# + http://lists.linuxfromscratch.org/pipermail/lfs-support/2004-June/023900.html
####################################################################
LOCALE_ARCHIVE = if pkgs.stdenv.isLinux then "${pkgs.glibcLocales}/lib/locale/locale-archive" else "";
}
How to find packages with attributes path on the console
$ nix-env -qaP 'erlang*'
# ...
nixos.erlangR20 erlang-20.3.8.9
nixos.erlangR21 erlang-21.3.8.3
nixos.erlang erlang-22.1.7
# ...
$ nix-env -f ~/clones/nixpkgs/ -qaP 'erlang*'
# ...
nixos.erlangR20 erlang-20.3.8.9
nixos.erlangR21 erlang-21.3.8.3
nixos.erlang erlang-22.1.7
# ...
=== >>> erlangR23 erlang-23.0.2 <<<====
Consider using kerl. It allows you to work with several Erlang installations https://github.com/kerl/kerl

Resources