I have try to compile and build libcurl inside my toolcahin folder by using cross compile but always I got same error...
1-First I build openssl by this steps
export TOOLCHAIN=/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi
export CC=$TOOLCHAIN/bin/arm-linux-gnueabi-gcc-7.5.0
export RANLIB=$TOOLCHAIN/bin/arm-linux-gnueabi-ranlib
export PATH="$TOOLCHAIN/bin:$PATH"
./Configure linux-generic32 --prefix=$TOOLCHAIN/arm-linux-gnueabi/libc/usr no-async
make depends
make
make install
.
.
.
cp libcrypto.pc /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig
chmod 644 /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig/libcrypto.pc
cp libssl.pc /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig
chmod 644 /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig/libssl.pc
cp openssl.pc /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig
chmod 644 /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/sysroot/usr/lib/pkgconfig/openssl.pc
.
.
.
~/$ ls -n from gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi
total 36
drwxr-xr-x 6 raed raed 4096 نوف 26 12:31 arm-linux-gnueabi
drwxr-xr-x 2 raed raed 4096 ديس 4 2019 bin
-rw-r--r-- 1 raed raed 11287 ديس 4 2019 gcc-linaro-7.5.0-2019.12-linux-manifest.txt
drwxr-xr-x 3 raed raed 4096 ديس 4 2019 include
drwxr-xr-x 3 raed raed 4096 ديس 4 2019 lib
drwxr-xr-x 3 raed raed 4096 ديس 4 2019 libexec
drwxr-xr-x 8 raed raed 4096 ديس 4 2019 share
~/$ ls -n from arm-linux-gnueabi/libc/usr
total 28
drwxr-xr-x 2 raed raed 4096 نوف 26 12:18 bin
drwxr-xr-x 34 raed raed 4096 نوف 26 12:18 include
drwxr-xr-x 6 raed raed 4096 نوف 26 12:18 lib
drwxr-xr-x 3 raed raed 4096 ديس 4 2019 libexec
drwxr-xr-x 2 raed raed 4096 ديس 4 2019 sbin
drwxr-xr-x 5 raed raed 4096 ديس 4 2019 share
drwxrwxr-x 6 raed raed 4096 نوف 26 12:18 ssl
2-Then I have try to build libcurl with--ssl but I have got error
cd curl-7.72.0
export TOOLCHAIN=/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi
export CC=$TOOLCHAIN/bin/arm-linux-gnueabi-gcc-7.5.0
export RANLIB=$TOOLCHAIN/bin/arm-linux-gnueabi-ranlib
export PATH="$TOOLCHAIN/bin:$PATH"
./configure --with-ssl=/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr --host=arm-linux-gnueabi
.
.
.
configure: PKG_CONFIG_LIBDIR will be set to "/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/lib/pkgconfig"
checking for arm-linux-gnueabi-pkg-config... /usr/bin/pkg-config
checking for openssl options with pkg-config... found
configure: pkg-config: SSL_LIBS: "-lssl -lcrypto"
configure: pkg-config: SSL_LDFLAGS: "-L/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/lib"
configure: pkg-config: SSL_CPPFLAGS: "-I/home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/include"
checking for HMAC_Update in -lcrypto... no
checking for HMAC_Init_ex in -lcrypto... no
checking OpenSSL linking with -ldl... no
checking OpenSSL linking with -ldl and -lpthread... no
configure: OPT_SSL: /home/MY/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr
configure: OPENSSL_ENABLED:
configure: error: --with-ssl was given but OpenSSL could not be detected
P.s: same steps work just fine on ubuntu 18.04
There are a lot of different ways to build libcurl with openssl support, and this may not be immediate to find out what is causing this issue.
But here is the procedure I am using on Ubuntu 20.04.1 - You may have to adjust the content of the CROSS_COMPILE variable, since you are using the arm-linux-gnueabi toolchain, and not the arm-none-linux-gnueabihf one: I am using the gcc toolchain for Cortex-A from ARM.
The versions of curl and openssl may have to be adjusted as well.
CROSS_COMPILE=/opt/arm/9/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-
PREFIX=$(pwd)/sysroot
wget https://www.openssl.org/source/openssl-1.1.1h.tar.gz
tar zxf openssl-1.1.1h.tar.gz
pushd openssl-1.1.1h
./Configure linux-generic32 shared -DL_ENDIAN --prefix=${PREFIX} --openssldir=${PREFIX} shared
make CROSS_COMPILE=/opt/arm/9/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf- PROCESSOR=ARM install
popd
wget https://zlib.net/zlib-1.2.11.tar.gz
tar xvf zlib-1.2.11.tar.gz
pushd zlib-1.2.11
CC=${CROSS_COMPILE}gcc ./configure --prefix=${PREFIX}
make CC=${CROSS_COMPILE}gcc all install
popd
wget https://curl.haxx.se/download/curl-7.73.0.tar.gz
tar zxf curl-7.73.0.tar.gz
pushd curl-7.73.0
CC=${CROSS_COMPILE}gcc LD=${CROSS_COMPILE}ld AR=${CROSS_COMPILE}ar NM=${CROSS_COMPILE}nm AS=${CROSS_COMPILE}as ./configure --disable-static --enable-shared --with-ssl=${PREFIX} --prefix=${PREFIX} --host=arm-none-linux-gnueabihf --target=arm-none-linux-gnueabihf --without-libidn2
make CC=${CROSS_COMPILE}gcc LD=${CROSS_COMPILE}ld AR=${CROSS_COMPILE}ar NM=${CROSS_COMPILE}nm AS=${CROSS_COMPILE}as install
popd
ll -gG sysroot/lib/
total 6796
drwxrwxr-x 4 4096 Nov 16 08:10 ./
drwxrwxr-x 9 4096 Nov 16 07:53 ../
drwxrwxr-x 2 4096 Nov 16 07:53 engines-1.1/
-rw-r--r-- 1 3199974 Nov 16 07:53 libcrypto.a
lrwxrwxrwx 1 16 Nov 16 07:53 libcrypto.so -> libcrypto.so.1.1*
-rwxr-xr-x 1 2087864 Nov 26 07:53 libcrypto.so.1.1*
-rwxr-xr-x 1 1027 Nov 26 08:10 libcurl.la*
lrwxrwxrwx 1 16 Nov 26 08:10 libcurl.so -> libcurl.so.4.7.0*
lrwxrwxrwx 1 16 Nov 26 08:10 libcurl.so.4 -> libcurl.so.4.7.0*
-rwxr-xr-x 1 407748 Nov 26 08:10 libcurl.so.4.7.0*
-rw-r--r-- 1 578076 Nov 26 07:53 libssl.a
lrwxrwxrwx 1 13 Nov 26 07:53 libssl.so -> libssl.so.1.1*
-rwxr-xr-x 1 453684 Nov 26 07:53 libssl.so.1.1*
-rw-r--r-- 1 96210 Nov 26 07:51 libz.a
lrwxrwxrwx 1 14 Nov 26 07:51 libz.so -> libz.so.1.2.11*
lrwxrwxrwx 1 14 Nov 26 07:51 libz.so.1 -> libz.so.1.2.11*
-rwxr-xr-x 1 98708 Nov 26 07:51 libz.so.1.2.11*
drwxrwxr-x 2 4096 Nov 26 08:10 pkgconfig/
file sysroot/bin/curl
sysroot/bin/curl: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped
share edit delete flag
Thank you ..
I solve the issue ...
The problem is with zlib need to build it inside toolchain and add this in configure seetings
--with-zlib=$prefix/lib
Please find below set of cmds & outputs
[ec2-user#ip-172-31-38-218 opt]$ ls -al
total 9416
drwxr-xr-x 3 root root 4096 Nov 7 13:52 .
dr-xr-xr-x 25 root root 4096 Nov 7 13:16 ..
-rw-r--r-- 1 root root 9625824 Sep 4 22:52 apache-tomcat-8.5.34.tar.gz
drwxr-xr-x 5 root root 4096 Aug 11 01:26 aws
[ec2-user#ip-172-31-38-218 opt]$ sudo groupadd tomcatgrp
[ec2-user#ip-172-31-38-218 opt]$ sudo useradd -s /bin/false -g tomcatgrp -d /opt/tomcatfolder tomcatuser
[ec2-user#ip-172-31-38-218 opt]$ ls -al
total 9420
drwxr-xr-x 4 root root 4096 Nov 7 13:53 .
dr-xr-xr-x 25 root root 4096 Nov 7 13:16 ..
-rw-r--r-- 1 root root 9625824 Sep 4 22:52 apache-tomcat-8.5.34.tar.gz
drwxr-xr-x 5 root root 4096 Aug 11 01:26 aws
drwx------ 2 tomcatuser tomcatgrp 4096 Nov 7 13:53 tomcatfolder
Now, when I run the cmd I am getting Permission denied as follows
[ec2-user#ip-172-31-38-218 opt]$ cd /opt/tomcatfolder/
-bash: cd: /opt/tomcatfolder/: Permission denied
Can you please help in resolving this above issue..?
I followed instructions of installing Tomcat from this link how-to-install-apache-tomcat-8-on-centos-7
It seems you are the ec2-user, but the directory is owned by tomcatuser and the permissions on the directory do now allow other users or groups to read it.
Try sudo chmod 755 /opt/tomcatfolder/ and then cd into it.
That will add read and execute permissions to the directory.
I write a Dockerfile and docker-compose.yml to build a custom image which combines beakerx and cling, which contents are below.
FROM beakerx/beakerx
MAINTAINER liudonghua123 <liudonghua123#gmail.com>
# not works
#RUN conda install xeus-cling notebook -c QuantStack -c conda-forge -y --quiet
USER root
# install gcc7
RUN add-apt-repository -y ppa:jonathonf/gcc-7.2
RUN apt-get update -y
RUN apt-get install -y gcc-7
# revert to beakerx user
USER beakerx
ARG CLING_FILENAME=cling_2018-09-04_ubuntu16
RUN echo "use ${CLING_FILENAME} for build"
# add the prebuild cling packages
ADD ${CLING_FILENAME}.tar.bz2 /home/beakerx
ENV PATH=/home/beakerx/${CLING_FILENAME}/bin:$PATH
USER root
RUN pip install --upgrade pip
# install steps, https://github.com/root-project/cling/tree/master/tools/Jupyter
RUN cd /home/beakerx/${CLING_FILENAME}/share/cling/Jupyter/kernel && pip install -e . && jupyter-kernelspec install --user cling-cpp17 && jupyter-kernelspec install --user cling-cpp1z && jupyter-kernelspec install --user cling-cpp14 && jupyter-kernelspec install --user cling-cpp11
RUN ln -s /usr/bin/gcc-7 /usr/bin/gcc
RUN echo "root:root" | chpasswd
RUN echo "beakerx:beakerx" | chpasswd
RUN chown -R beakerx:beakerx /home/beakerx/.local
RUN find /home/beakerx/.local -type d -exec chmod 755 {} \;
RUN find /home/beakerx/.local -type f -exec chmod 644 {} \;
RUN id
RUn ls -la /home/beakerx/.local
RUn ls -la /home/beakerx/.local/share
USER beakerx
and
version: '2'
services:
beakerx-cling-prebuild:
build: .
image: liudonghua123/beakerx-cling-prebuild:latest
ports:
- "28888:8888"
volumes:
- ./work:/work
restart: always
Some logs of docker-compose build were
Step 22/24 : RUN ls -la /home/beakerx/.local
---> Running in 95457585aed0
total 12
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 .
drwxr-xr-x 25 beakerx beakerx 4096 Sep 6 00:51 ..
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 share
---> affcb9f1ca94
Removing intermediate container 95457585aed0
Step 23/24 : RUN ls -la /home/beakerx/.local/share
---> Running in 15ea51bcc3bf
total 12
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 .
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 ..
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 jupyter
---> 6f2ca28d4d21
Removing intermediate container 15ea51bcc3bf
Step 24/24 : USER beakerx
---> Running in 0ab6574079d7
---> 9561902b99ef
Removing intermediate container 0ab6574079d7
Successfully built 9561902b99ef
But When I run docker-compose up -d, I got PermissionError: [Errno 13] Permission denied: '/home/beakerx/.local/share' error. So I drive into the docker image.
ldh#ldh55:~/docker/cling/jupinger/beakerx-cling-prebuild$ docker run -it --entrypoint='' --rm liudonghua123/beakerx-cling-prebuild bash
beakerx#716d9a8334ca:~$ ls -la ~
total 108
drwxr-xr-x 25 beakerx beakerx 4096 Sep 6 00:51 .
drwxr-xr-x 11 root root 4096 Sep 6 00:51 ..
-rw-r--r-- 1 beakerx beakerx 220 Aug 31 2015 .bash_logout
-rw-r--r-- 1 beakerx beakerx 3771 Aug 31 2015 .bashrc
drwxr-xr-x 3 root root 4096 Mar 13 13:32 .config
-rw-r--r-- 1 beakerx beakerx 938 Mar 8 14:03 .gitignore
-rw-r--r-- 1 beakerx beakerx 53 Feb 27 2018 .jscsrc
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 .local
drwxr-xr-x 3 root root 4096 Mar 13 13:32 .npm
-rw-r--r-- 1 beakerx beakerx 655 May 16 2017 .profile
-rw-r--r-- 1 beakerx beakerx 2285 Feb 27 2018 CONTRIBUTING.md
-rw-r--r-- 1 beakerx beakerx 11325 Feb 27 2018 LICENSE
-rw-r--r-- 1 beakerx beakerx 193 Feb 27 2018 NOTICE
-rw-r--r-- 1 beakerx beakerx 8682 Mar 12 14:27 README.md
-rw-r--r-- 1 beakerx beakerx 5821 Mar 12 20:04 StartHere.ipynb
-rw-r--r-- 1 beakerx beakerx 6 Mar 13 13:32 VERSION
drwxr-xr-x 16 beakerx beakerx 4096 Mar 12 20:11 beakerx
drwxr-xr-x 8 14806 2735 4096 Sep 5 07:44 cling_2018-09-04_ubuntu16
drwxr-xr-x 22 beakerx beakerx 4096 Feb 27 2018 doc
-rw-r--r-- 1 beakerx beakerx 81 Feb 27 2018 environment.yml
drwxr-xr-x 6 beakerx beakerx 4096 Feb 27 2018 js
-rwxr-xr-x 1 beakerx beakerx 927 Mar 13 12:42 setup.sh
beakerx#716d9a8334ca:~$ ls -la ~/.local/
ls: cannot access '/home/beakerx/.local/share': Permission denied
total 8
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 .
drwxr-xr-x 25 beakerx beakerx 4096 Sep 6 00:51 ..
d????????? ? ? ? ? ? share
beakerx#716d9a8334ca:~$ ls -la ~/.local/share
ls: cannot access '/home/beakerx/.local/share': Permission denied
beakerx#716d9a8334ca:~$
beakerx#716d9a8334ca:~$ su
Password:
root#716d9a8334ca:/home/beakerx# ls -la ~
total 28
drwx------ 4 root root 4096 Mar 13 13:27 .
drwxr-xr-x 77 root root 4096 Sep 6 01:06 ..
-rw-r--r-- 1 root root 3106 Oct 22 2015 .bashrc
drwxr-xr-x 3 root root 4096 Mar 13 13:20 .conda
-rw-r--r-- 1 root root 38 Mar 13 13:20 .condarc
drwxr-xr-x 5 root root 4096 Mar 13 13:28 .gradle
-rw-r--r-- 1 root root 148 Aug 17 2015 .profile
root#716d9a8334ca:/home/beakerx# ls -la /home/beakerx/
total 108
drwxr-xr-x 25 beakerx beakerx 4096 Sep 6 00:51 .
drwxr-xr-x 11 root root 4096 Sep 6 00:51 ..
-rw-r--r-- 1 beakerx beakerx 220 Aug 31 2015 .bash_logout
-rw-r--r-- 1 beakerx beakerx 3771 Aug 31 2015 .bashrc
drwxr-xr-x 3 root root 4096 Mar 13 13:32 .config
-rw-r--r-- 1 beakerx beakerx 938 Mar 8 14:03 .gitignore
-rw-r--r-- 1 beakerx beakerx 53 Feb 27 2018 .jscsrc
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 .local
drwxr-xr-x 3 root root 4096 Mar 13 13:32 .npm
-rw-r--r-- 1 beakerx beakerx 655 May 16 2017 .profile
-rw-r--r-- 1 beakerx beakerx 2285 Feb 27 2018 CONTRIBUTING.md
-rw-r--r-- 1 beakerx beakerx 11325 Feb 27 2018 LICENSE
-rw-r--r-- 1 beakerx beakerx 193 Feb 27 2018 NOTICE
-rw-r--r-- 1 beakerx beakerx 8682 Mar 12 14:27 README.md
-rw-r--r-- 1 beakerx beakerx 5821 Mar 12 20:04 StartHere.ipynb
-rw-r--r-- 1 beakerx beakerx 6 Mar 13 13:32 VERSION
drwxr-xr-x 16 beakerx beakerx 4096 Mar 12 20:11 beakerx
drwxr-xr-x 8 14806 2735 4096 Sep 5 07:44 cling_2018-09-04_ubuntu16
drwxr-xr-x 22 beakerx beakerx 4096 Feb 27 2018 doc
-rw-r--r-- 1 beakerx beakerx 81 Feb 27 2018 environment.yml
drwxr-xr-x 6 beakerx beakerx 4096 Feb 27 2018 js
-rwxr-xr-x 1 beakerx beakerx 927 Mar 13 12:42 setup.sh
root#716d9a8334ca:/home/beakerx# ls -la /home/beakerx/.local/
total 12
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 .
drwxr-xr-x 25 beakerx beakerx 4096 Sep 6 00:51 ..
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 share
root#716d9a8334ca:/home/beakerx# ls -la /home/beakerx/.local/share/
total 12
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 .
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 ..
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 jupyter
root#716d9a8334ca:/home/beakerx# exit
exit
beakerx#716d9a8334ca:~$ ls -la ~/.local/share
total 12
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 .
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 ..
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 jupyter
beakerx#716d9a8334ca:~$
Why the permission of ~/.local/share was a lot of question marks at the first sight, and when I run as root or return to the original user, it was correct.
I tried run start-notebook.sh manually, the first time it was failed, then the second time it was successfully.
beakerx#716d9a8334ca:~$ cd /usr/local/bin/
beakerx#716d9a8334ca:/usr/local/bin$ ls
start-notebook.sh start-singleuser.sh start.sh
beakerx#716d9a8334ca:/usr/local/bin$
beakerx#716d9a8334ca:/usr/local/bin$
beakerx#716d9a8334ca:/usr/local/bin$ start-notebook.sh
Execute the command
Traceback (most recent call last):
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/traitlets/traitlets.py", line 528, in get
value = obj._trait_values[self.name]
KeyError: 'runtime_dir'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/envs/beakerx/bin/jupyter-notebook", line 6, in <module>
sys.exit(notebook.notebookapp.main())
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/notebook/notebookapp.py", line 1505, in initialize
self.init_configurables()
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/notebook/notebookapp.py", line 1209, in init_configurables
connection_dir=self.runtime_dir,
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in __get__
return self.get(obj, cls)
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/traitlets/traitlets.py", line 535, in get
value = self._validate(obj, dynamic_default())
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/jupyter_core/application.py", line 99, in _runtime_dir_default
ensure_dir_exists(rd, mode=0o700)
File "/opt/conda/envs/beakerx/lib/python3.6/site-packages/jupyter_core/utils/__init__.py", line 13, in ensure_dir_exists
os.makedirs(path, mode=mode)
File "/opt/conda/envs/beakerx/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/beakerx/.local/share/jupyter/runtime'
beakerx#716d9a8334ca:/usr/local/bin$ ll /home/beakerx/.local/share/jupyter/runtime
ls: cannot access '/home/beakerx/.local/share/jupyter/runtime': Permission denied
beakerx#716d9a8334ca:/usr/local/bin$ ll /home/beakerx/.local/share/jupyter/
ls: cannot access '/home/beakerx/.local/share/jupyter/kernels': Permission denied
total 8
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 ./
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 ../
d????????? ? ? ? ? ? kernels/
beakerx#716d9a8334ca:/usr/local/bin$ ll /home/beakerx/.local/share/
total 12
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 ./
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 ../
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 jupyter/
beakerx#716d9a8334ca:/usr/local/bin$ su
Password:
root#716d9a8334ca:/usr/local/bin# ls -l /home/beakerx/.local/share/jupyter/runtime
ls: cannot access '/home/beakerx/.local/share/jupyter/runtime': No such file or directory
root#716d9a8334ca:/usr/local/bin# ls -l /home/beakerx/.local/share/jupyter/
total 4
drwxr-xr-x 18 beakerx beakerx 4096 Sep 6 00:51 kernels
root#716d9a8334ca:/usr/local/bin# ls -l /home/beakerx/.local/share/
total 4
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 00:51 jupyter
root#716d9a8334ca:/usr/local/bin# ls -l /home/beakerx/.local/share/jupyter/kernels/
total 16
drwxr-xr-x 2 beakerx beakerx 4096 Sep 6 00:51 cling-cpp11
drwxr-xr-x 2 beakerx beakerx 4096 Sep 6 00:51 cling-cpp14
drwxr-xr-x 2 beakerx beakerx 4096 Sep 6 00:51 cling-cpp17
drwxr-xr-x 2 beakerx beakerx 4096 Sep 6 00:51 cling-cpp1z
root#716d9a8334ca:/usr/local/bin# exit
exit
beakerx#716d9a8334ca:/usr/local/bin$ id
uid=1000(beakerx) gid=1000(beakerx) groups=1000(beakerx)
beakerx#716d9a8334ca:/usr/local/bin$ start-notebook.sh
Execute the command
[I 01:20:56.433 NotebookApp] Writing notebook server cookie secret to /home/beakerx/.local/share/jupyter/runtime/notebook_cookie_secret
[W 01:20:56.567 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 01:20:56.647 NotebookApp] [beakerx] enabled
[I 01:20:56.736 NotebookApp] JupyterLab beta preview extension loaded from /opt/conda/envs/beakerx/lib/python3.6/site-packages/jupyterlab
[I 01:20:56.736 NotebookApp] JupyterLab application directory is /opt/conda/envs/beakerx/share/jupyter/lab
[I 01:20:56.971 NotebookApp] Serving notebooks from local directory: /usr/local/bin
[I 01:20:56.971 NotebookApp] 0 active kernels
[I 01:20:56.971 NotebookApp] The Jupyter Notebook is running at:
[I 01:20:56.971 NotebookApp] http://[all ip addresses on your system]:8888/?token=1b94f5bf7e14e4ed5defece6870addc630d81eb8aae85990
[I 01:20:56.971 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 01:20:56.972 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=1b94f5bf7e14e4ed5defece6870addc630d81eb8aae85990
If I modified Dockerfile (move up USER beakerx)
FROM beakerx/beakerx
MAINTAINER liudonghua123 <liudonghua123#gmail.com>
# not works
#RUN conda install xeus-cling notebook -c QuantStack -c conda-forge -y --quiet
USER root
# install gcc7
RUN add-apt-repository -y ppa:jonathonf/gcc-7.2
RUN apt-get update -y
RUN apt-get install -y gcc-7
# revert to beakerx user
USER beakerx
ARG CLING_FILENAME=cling_2018-09-04_ubuntu16
RUN echo "use ${CLING_FILENAME} for build"
# add the prebuild cling packages
ADD ${CLING_FILENAME}.tar.bz2 /home/beakerx
ENV PATH=/home/beakerx/${CLING_FILENAME}/bin:$PATH
USER root
RUN pip install --upgrade pip
# install steps, https://github.com/root-project/cling/tree/master/tools/Jupyter
RUN cd /home/beakerx/${CLING_FILENAME}/share/cling/Jupyter/kernel && pip install -e . && jupyter-kernelspec install --user cling-cpp17 && jupyter-kernelspec install --user cling-cpp1z && jupyter-kernelspec install --user cling-cpp14 && jupyter-kernelspec install --user cling-cpp11
RUN ln -s /usr/bin/gcc-7 /usr/bin/gcc
RUN echo "root:root" | chpasswd
RUN echo "beakerx:beakerx" | chpasswd
RUN usermod -aG sudo beakerx
RUN echo beakerx | sudo -S chown -R beakerx:beakerx /home/beakerx/
RUN echo beakerx | sudo -S find /home/beakerx/ -type d -exec chmod 755 {} \;
RUN echo beakerx | sudo -S find /home/beakerx/ -type f -exec chmod 644 {} \;
USER beakerx
RUN id
RUn ls -la /home/beakerx/.local
RUn ls -la /home/beakerx/.local/share
Then some errors occurred (ls -la /home/beakerx/.local).
Step 18/25 : RUN usermod -aG sudo beakerx
---> Using cache
---> 2b341f8539b9
Step 19/25 : RUN echo beakerx | sudo -S chown -R beakerx:beakerx /home/beakerx/
---> Running in 8adb3c593f96
---> bd6237aa0196
Removing intermediate container 8adb3c593f96
Step 20/25 : RUN echo beakerx | sudo -S find /home/beakerx/ -type d -exec chmod 755 {} \;
---> Running in 5dc9ff3d8d1b
---> 98d3338124ce
Removing intermediate container 5dc9ff3d8d1b
Step 21/25 : RUN echo beakerx | sudo -S find /home/beakerx/ -type f -exec chmod 644 {} \;
---> Running in 63a4ce864b75
---> 0ca175cb1663
Removing intermediate container 63a4ce864b75
Step 22/25 : USER beakerx
---> Running in 42f8c91f6930
---> 94e9f6099aa3
Removing intermediate container 42f8c91f6930
Step 23/25 : RUN id
---> Running in 6f24ee8ce894
uid=1000(beakerx) gid=1000(beakerx) groups=1000(beakerx),27(sudo)
---> 58627cedc9de
Removing intermediate container 6f24ee8ce894
Step 24/25 : RUN ls -la /home/beakerx/.local
---> Running in cfd7bdd70666
ls: cannot access '/home/beakerx/.local/share': Permission denied
total 8
drwxr-xr-x 6 beakerx beakerx 4096 Sep 6 03:08 .
drwxr-xr-x 43 beakerx beakerx 4096 Sep 6 03:09 ..
d????????? ? ? ? ? ? share
ERROR: Service 'beakerx-cling-prebuild' failed to build: The command '/bin/sh -c ls -la /home/beakerx/.local' returned a non-zero code: 1
ldh#ldh55:~/docker/cling/jupinger/beakerx-cling-prebuild$
This problem is related to the storage-driver bug, see https://github.com/moby/moby/issues/28391, https://github.com/moby/moby/issues/20240. Currently I can only change storage-driver to overlay, use the default aufs or recommended overlay2 will break.
If you came here after you copied a file or folder with "docker cp" using docker-ce 17.x, you can simply resolve the issue by restarting the docker service (make sure it really was stopped) or rebooting the whole system.
I have had that issue a few times and usually the file was back to normal after a reboot. I read in this thread that:
If you improperly mount a filesystem, the mount point of that
filesystem may show up with question marks.
. 'you' means docker in that case and restarting the service "remounts" the storage layer.
I installed karma locally using
npm install karma --save-dev
and then i tried
$ ./node_modules/karma/bin/karma start
Then i get this error
vagrant#development:$ ./node_modules/karma/bin/karma start
-bash: ./node_modules/karma/bin/karma: Permission denied
vagrant#development:$ ls -liah ./node_modules/karma/bin/
total 4.0K
54696 drwxrwxr-x 1 vagrant www-data 102 Nov 17 19:24 .
54688 drwxrwxr-x 1 vagrant www-data 544 Nov 17 15:57 ..
54697 -rw-rw-r-- 1 vagrant www-data 50 Nov 15 02:43 karma
What can be the reason
http://karma-runner.github.io/0.12/intro/installation.html
vagrant#development:$ sudo chmod +x ./node_modules/karma/bin/karma
vagrant#development:$ ls -liah ./node_modules/karma/bin/
total 4.0K
54696 drwxrwxr-x 1 vagrant www-data 102 Nov 17 19:24 .
54688 drwxrwxr-x 1 vagrant www-data 544 Nov 17 15:57 ..
54697 -rw-rw-r-- 1 vagrant www-data 50 Nov 15 02:43 karma
Your ./node_modules/karma/bin/karma executable does not have execution privileges for your user. You can chmod it to give you the right privileges with:
$ chmod +x ./node_modules/karma/bin/karma
To avoid this in the future, simply install it with npm install -g karma-cli (globally).
Earlier this afternoon I installed Node.js on Fedora 16.
user#$ sudo yum localinstall --nogpgcheck http://nodejs.tchol.org/repocfg/fedora/nodejs-stable-release.noarch.rpm
user#$ sudo yum install nodejs-compat-symlinks npm
Then I installed a package with npm. Every package I've installed with npm on Fedora (this isn't my first time) has involved something like the following process. Read it and weep. Clearly, this is hackish and wrong, but when I decide to install less or any other npm package, I have to go through the same procedure. Why? What is broken about my environment or approach?
user#$ sudo npm install -g jslint
[... this works ... kind of]
user#$ jslint
bash: jslint: command not found
user#$ sudo su
root#$ jslint
No files specified.
Usage: /bin/jslint ... [works]
root#$ which jslint
/bin/jslint
root#$ ls -l jslint
lrwxrwxrwx. 1 root root 38 Jul 15 14:58 /bin/jslint -> /lib/node_modules/jslint/bin/jslint.js
root#$ cd /lib/node_modules; ls -l
...
drwxr-xr-x. 2 root root 4096 Jul 15 14:22 inherits
drwxr-xr-x. 2 root root 4096 Jul 15 14:22 ini
drwx------. 6 nobody usergroup 4096 Jul 15 14:58 jshint
drwxr-xr-x. 3 root root 4096 Jul 15 14:22 lru-cache
...
root#$ find . -type d -print0 | xargs -0 chmod 755
root#$ ls -l
...
drwxr-xr-x. 2 root root 4096 Jul 15 14:22 inherits
drwxr-xr-x. 2 root root 4096 Jul 15 14:22 ini
drwxr-xr-x. 5 nobody usergroup 4096 Jul 15 15:32 jslint
drwxr-xr-x. 3 root root 4096 Jul 15 14:22 lru-cache
...
root#$ su user
user#$ jslint
o files specified.
Usage: /bin/jslint [now it finally works]
Recent versions of npm switch to user "nobody" as a security measure if it's being run with sudo privileges. Try doing global installs while logged in as root, rather than using sudo.