cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
776
Views
1
Helpful
3
Replies

install_ydk.sh not working on Ubuntu 22.04 (Jammy Jellyfish)

hyber
Level 1
Level 1

Hi all, 

Im trying to install the ydk-gen on my Ubuntu 22.04 (in WSL), but the installer keeps failing with this:

 

[ 97%] Linking CXX static library libydk-0.8.6.5.a
Creating symbolic link /usr/local/lib/libydk.a
[ 97%] Built target ydk-0.8.6.5
[ 97%] Building CXX object samples/CMakeFiles/bgp.dir/bgp.cpp.o
[ 98%] Linking CXX executable bgp
/usr/bin/ld: warning: libcrypto.so.1.1, needed by /usr/local/lib/libssh.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RAND_add@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_cmp@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_DigestInit@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `ECDSA_SIG_get0@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_set0_crt_params@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_generate_parameters@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_dec2bn@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_aes_192_ctr@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `CRYPTO_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_GROUP_get_degree@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_md5@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_sha256@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_sign@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `ECDSA_SIG_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_SIG_get0@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_aes_192_cbc@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_KEY_get0_group@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BIO_s_mem@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `ECDSA_do_sign@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `ERR_get_error@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_KEY_set_asn1_flag@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_set0_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_DecryptUpdate@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `PEM_read_bio_ECPrivateKey@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_get0_pqg@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_des_ede3_cbc@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_POINT_cmp@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_set0_pqg@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BIO_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_KEY_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `HMAC_Init_ex@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_SIG_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DES_ncbc_encrypt@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_rand@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_MD_CTX_reset@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_SIG_set0@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_mod_exp@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_clear_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_DigestFinal@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_bn2bin@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `HMAC_Update@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_CTX_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_get0_factors@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_size@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `HMAC_CTX_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `ECDSA_SIG_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_KEY_get0_public_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_KEY_generate_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_verify@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_set0_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_sha512@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_DecryptInit_ex@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_get0_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_POINT_point2oct@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_sha384@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `ERR_error_string@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_KEY_dup@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_POINT_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_MD_CTX_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_POINT_oct2point@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `HMAC_CTX_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `OPENSSL_init_crypto@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_get0_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BIO_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `PEM_write_bio_DSAPrivateKey@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_set0_factors@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_GROUP_get_curve_name@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DES_set_odd_parity@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_size@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `HMAC_CTX_reset@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `ECDSA_do_verify@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `PEM_write_bio_ECPrivateKey@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_KEY_new_by_curve_name@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_generate_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_bf_cbc@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BIO_new_mem_buf@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_EncryptInit_ex@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_aes_128_cbc@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `PEM_write_bio_RSAPrivateKey@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `PEM_read_bio_DSAPrivateKey@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_EncryptUpdate@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_aes_128_ctr@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_sha1@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_CTX_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `ECDSA_SIG_set0@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_POINT_clear_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_get0_crt_params@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_aes_256_cbc@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_CIPHER_CTX_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_DigestUpdate@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_aes_256_ctr@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `ECDH_compute_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_do_sign@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_SIG_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_POINT_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_dup@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `HMAC_Final@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `PEM_read_bio_RSAPrivateKey@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_KEY_get0_private_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_KEY_set_public_key@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_bn2dec@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BIO_ctrl@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DES_set_key_unchecked@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_CIPHER_CTX_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_num_bits@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_CIPHER_CTX_reset@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_MD_CTX_free@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RAND_bytes@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EC_GROUP_cmp@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_generate_key_ex@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_new@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_set_word@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_DigestInit_ex@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `EVP_CIPHER_CTX_set_padding@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_bin2bn@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `DSA_do_verify@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RAND_pseudo_bytes@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_bn2hex@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `BN_is_bit_set@OPENSSL_1_1_0'
/usr/bin/ld: /usr/local/lib/libssh.so: undefined reference to `RSA_free@OPENSSL_1_1_0'
collect2: error: ld returned 1 exit status
make[2]: *** [samples/CMakeFiles/bgp.dir/build.make:108: samples/bgp] Error 1
make[1]: *** [CMakeFiles/Makefile2:268: samples/CMakeFiles/bgp.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

 

Now I do see the warning that libcrypto.so.1.1 is not found.. and I cannot find it on my machine:

 

root@fe41bdeba219:/ydk-gen# find / -name libcrypto*
/root/confd/lib/libcrypto.so.1.0.0
/usr/lib/x86_64-linux-gnu/libcrypto.so.3
/usr/lib/x86_64-linux-gnu/pkgconfig/libcrypto.pc
/usr/lib/x86_64-linux-gnu/libcrypto.so
/usr/lib/x86_64-linux-gnu/libcrypto.a
/ydk-gen/3d_party/linux/ubuntu/lib/libcrypto.so.1.0.0

 

libssl etc. is installed by the script

 

root@fe41bdeba219:/ydk-gen# dpkg --list |grep ssl
ii  libflac8:amd64                1.3.3-2ubuntu0.1                        amd64        Free Lossless Audio Codec - runtime C library
ii  libssl-dev:amd64              3.0.2-0ubuntu1.9                        amd64        Secure Sockets Layer toolkit - development files
ii  libssl3:amd64                 3.0.2-0ubuntu1.9                        amd64        Secure Sockets Layer toolkit - shared libraries
ii  libzstd1:amd64                1.4.8+dfsg-3build1                      amd64        fast lossless compression algorithm
ii  openssl                       3.0.2-0ubuntu1.9                        amd64        Secure Sockets Layer toolkit - cryptographic utility
ii  zstd                          1.4.8+dfsg-3build1                      amd64        fast lossless compression algorithm -- CLI tool
root@fe41bdeba219:/ydk-gen#

 

To make sure, I booted up a docker container and tried the following procedure:

docker run -exec -it ubuntu:22.04 bash
apt-get update
apt-get install git
git clone https://github.com/ygorelik/ydk-gen.git cd ydk-gen export YDKGEN_HOME=`pwd` export PYTHON_VENV=$HOME/ydk_vne ./install_ydk.sh --cpp --core --venv

but it ends up with the same problem... if I use ubuntu:18.04 as in the Dockerfile, it seems to work, but I would really like it to run on my ubuntu 22.04 in WSL, so its easy for me to use vscode

Any help is much appreciated.. 

Esben

3 Replies 3

hyber
Level 1
Level 1

So, I guess Jammy is not technically supported by the installer yet:

https://github.com/CiscoDevNet/ydk-gen/blob/27dd7d85134a62aa9e9fa48edc0359d32b6a31ec/install_ydk.sh#L503-L506

hyber_1-1685023286395.png

Anyways, I grabbed openssl 1.1 from here: https://www.openssl.org/source/old/1.1.0/openssl-1.1.0l.tar.gz

did:

 

wget https://www.openssl.org/source/old/1.1.0/openssl-1.1.0l.tar.gz
tar xfz openssl-1.1.0l.tar.gz 
cd openssl-1.1.0l
./config && make && make install 

 

Now the install completes.. I dont really like to have it installed as it un-supported, but I guess I can try and extract the .so file and just use that as its done in the 3d_party folder.. 

Suggestions are still welcome

Esben

 




Hi Esben

The support for ubuntu:jammy was added in February, but that code is still in my private fork. The installer was tested on docker image. There could be some specifics on WSL, although I did not see these issues previously.

Anyway, thank you for your workaround, it will help improve the installer in official 0.8.6.5 release.

Yan

Hi Yan, 

thanks again.. I had some time to play a little more with it and I tried your personal repo.. unfortunately it broke my environment due to the static linking of ssh/ssl libs.. I managed to update your script to make it work on my WSL install.. I created pull request to your private repo: https://github.com/ygorelik/ydk-gen/pull/16

Since I used your edits as base, I though it was better to merge with your repo than the "official" one.

Esben