Petalinux create app reported an error
mrzhang@ubuntu:~/works/MZ702P_FEP$ petalinux-create -t apps -n testapp --enable --force
INFO: Create apps: testapp
WARNING: Component "/home/mrzhang/works/MZ702P_FEP/project-spec/meta-user/recipes-apps/testapp" already exists.
WARNING: --force parameter specified, overwriting
INFO: New apps successfully created in /home/mrzhang/works/MZ702P_FEP/project-spec/meta-user/recipes-apps/testapp
INFO: Enabling created component...
INFO: sourcing bitbake
INFO: oldconfig rootfs
INFO: testapp has been enabled
Failed to open PetaLinux lib: librdi_commonxillic.so: cannot open shared object file: No such file or directory.
Solution:
sudo echo "/opt/pkg/petalinux/2018.3/tools/lib" > /etc/ld.so.conf.d/petalinux.so.conf
sudo ldconfig
Extended content:
Solution to ‘cannot open shared object file’ (Linux ):
1. Prompt when calling the dynamic library .so file in Linux:
cannot open shared object file: No such file or directory
Solution:
1. At this time, enter ldd xxx to check which libraries are missing
libmysqlcppconn.so.7 => not found
libboost_system.so.1.64.0 => not found
2. Set variable LD_LIBRARY_PATH
sudo gedit ~/.bashrc
Add on the last line:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/path
Re-open bash and then ldd to find the library path.
2. (Recommended) Modify the shared library configuration file /etc/ld.so.conf
/etc/ld.so.conf
1. Setting:
sudo gedit /etc/ld.so.conf
2. Add library path:
include /etc/ld.so.conf.d/*.conf
/home/xxx/Documents/core/Linux/Test/src/Test
Save and exit
3. Make the configuration effective immediately
sudo ldconfig