Error installing the LAMMPS Python Module and Shared Library

I have tried to perform full install as given here. The compilation finishes with “some errors”. Here’s the complete error command line oputput:

cmake -C ../cmake/presets/basic.cmake -D BUILD_SHARED_LIBS=on       -D LAMMPS_EXCEPTIONS=on -D PKG_PYTHON=on ../cmake
loading initial cache file ../cmake/presets/basic.cmake
CMake Error: Error processing file: /home/vinayak/Documents/github_repos/lammps/cmake/presets/basic.cmake
-- Running check for auto-generated files from make-based build system
-- Could NOT find FFMPEG (missing: FFMPEG_EXECUTABLE) 
-- Generating style_angle.h...
-- Generating style_atom.h...
-- Generating style_body.h...
-- Generating style_bond.h...
-- Generating style_command.h...
-- Generating style_compute.h...
-- Generating style_dihedral.h...
-- Generating style_dump.h...
-- Generating style_fix.h...
-- Generating style_improper.h...
-- Generating style_integrate.h...
-- Generating style_kspace.h...
-- Generating style_minimize.h...
-- Generating style_nbin.h...
-- Generating style_npair.h...
-- Generating style_nstencil.h...
-- Generating style_ntopo.h...
-- Generating style_pair.h...
-- Generating style_reader.h...
-- Generating style_region.h...
-- Generating packages_angle.h...
-- Generating packages_atom.h...
-- Generating packages_body.h...
-- Generating packages_bond.h...
-- Generating packages_command.h...
-- Generating packages_compute.h...
-- Generating packages_dihedral.h...
-- Generating packages_dump.h...
-- Generating packages_fix.h...
-- Generating packages_improper.h...
-- Generating packages_integrate.h...
-- Generating packages_kspace.h...
-- Generating packages_minimize.h...
-- Generating packages_nbin.h...
-- Generating packages_npair.h...
-- Generating packages_nstencil.h...
-- Generating packages_ntopo.h...
-- Generating packages_pair.h...
-- Generating packages_reader.h...
-- Generating packages_region.h...
-- Generating lmpinstalledpkgs.h...
-- Building package: PYTHON
-- The following tools and libraries have been found and configured:
 * Git
 * MPI
 * JPEG
 * PNG
 * ZLIB
 * PythonLibs
 * PythonInterp

-- <<< Build configuration >>>
   Build type       RelWithDebInfo
   Install path     /home/vinayak/.local
   Generator        Unix Makefiles using /usr/bin/make
   Compilers and Flags:
   C++ Compiler     /usr/bin/c++
       Type         GNU
       Version      9.4.0
   C++ Flags         -ffast-math -march=native -O2 -g -DNDEBUG
   Defines          MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX=1;LAMMPS_SMALLBIG;LAMMPS_MEMALIGN=64;LAMMPS_EXCEPTIONS;LAMMPS_JPEG;LAMMPS_PNG;LAMMPS_GZIP;LMP_PYTHON
-- Shared library flags:  
-- Link libraries: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so;/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libjpeg.so;/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libpython3.8.so;m
-- Using MPI with headers in /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi;/usr/lib/x86_64-linux-gnu/openmpi/include and these libraries: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so;/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so;
-- Configuring incomplete, errors occurred!
See also "/home/vinayak/Documents/github_repos/lammps/build/CMakeFiles/CMakeOutput.log".

Nevertheless, I proceeded with the build command with the following output:

$ cmake --build .
-- Generating lmpgitversion.h...
[  0%] Built target gitversion
Scanning dependencies of target lmp
[  1%] Building CXX object CMakeFiles/lmp.dir/home/vinayak/Documents/github_repos/lammps/src/lammps.cpp.o
[  2%] Linking CXX executable lmp
[100%] Built target lmp

And finally did the install using the cmake --install . command and got the following output:

cmake --install .
-- Install configuration: "RelWithDebInfo"
-- Installing: /home/vinayak/.local/bin/lmp
-- Set runtime path of "/home/vinayak/.local/bin/lmp" to ""
-- Up-to-date: /home/vinayak/.local/share/man/man1/lmp.1
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Zr_mm.eam.fs
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC.tersoff.zbl
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_Zuo_JPCA2020.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CdTeSe.bop.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/NiAlH_jea.eam.fs
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/GaN_sw.poly
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni_Zuo_JPCA2020.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.smtbq.Al2O3
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Fe_mm.eam.fs
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/AlO.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/NiAlH_jea.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si.tersoff.mod
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ge_Zuo_JPCA2020.quadratic.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ag_u3.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ge_Zuo_JPCA2020.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC_1994.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/MOH.nb3b.harmonic
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_Zuo_JPCA2020.quadratic.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si.tersoff.modc
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_Zuo_JPCA2020.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si_2.meam.spline
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CC.Lebedeva
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC.edip
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/W_2940_2017_2.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CC.KC-full
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_Zuo_JPCA2020.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/C.drip
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/AlCu.adp
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni.meam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.V_O_C_H
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.comb3
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si_1.meam.spline
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ta4.mgpt.potin
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ge.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CCu_v2.bop.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ti.meam.spline
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni.adp
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/FeP_mm.eam.fs
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/README.reax
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CdZnTe_v2.bop.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/He_He_JW2013.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.eim
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiO.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/C_10_10.mesocnt
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_Zuo_JPCA2020.quadratic.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/WBe_Wood_PRB2019.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si_Zuo_JPCA2020.quadratic.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo_Zuo_JPCA2020.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC_1989.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.ZnOH
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni_Zuo_JPCA2020.quadratic.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiO.1994.vashishta
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/BNCH-old.ILP
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni_Zuo_JPCA2020.quadratic.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Al_mm.eam.fs
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ti.meam.sw.spline
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo5.2.mgpt.parmin
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CdZnTe_v1.bop.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CuNi.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ta4.mgpt.parmin
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/charmm22.cmap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.mattsson
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC_Erhart-Albe.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/InP.vashishta
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiCGe.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CH.airebo
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ta06A.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo_Chen_PRM2017.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.AuO
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si_Zuo_JPCA2020.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/GaN.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/C.lcbop
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.budzien
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ta6.8x.mgpt.potin
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/library.meam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/AlFe_mm.eam.fs
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/W_He_JW2013.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CdTe.bop.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.FC
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_u6.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni_Zuo_JPCA2020.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/GaN.sw
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/AlSiMgCuFe.meam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ge_Zuo_JPCA2020.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/W_2940_2017_2.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/WL.meam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/AlCu.bop.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo_Zuo_JPCA2020.quadratic.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/TiO.meam.spline
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CC.KC
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Al_prb.agni
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CH_taper.KC
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si.sw
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/lib.comb3
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC.gw.zbl
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Li_Zuo_JPCA2020.quadratic.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiO.1997.vashishta
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si_Zuo_JPCA2020.quadratic.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CoAl.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CdTe.sw
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Li_Zuo_JPCA2020.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/GaAs.bop.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.lg
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Li_Zuo_JPCA2020.quadratic.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo_Chen_PRM2017.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Pd_u3.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/VFe_mm.eam.fs
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.comb
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo_Zuo_JPCA2020.quadratic.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si_Zuo_JPCA2020.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu.meam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/GaN_tersoff.poly
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CdTeZnSeHgS0.sw
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo_Chen_PRM2017.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC.meam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.rdx
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ci-reaxFF_ZBL.dat
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CH.airebo-m
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/BNC_MBD_bulk.ILP
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ge_Zuo_JPCA2020.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ta06A.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/FeCr.cdeam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CuZr_mm.eam.fs
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.AB
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/WBe_Wood_PRB2019.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Li_Zuo_JPCA2020.quadratic.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni_u3.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.Fe_O_C_H
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo5.2.mgpt.potin
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo_Zuo_JPCA2020.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/BN.extep
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/V6.1.mgpt.potin
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si.b.meam.sw.spline
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/W_2940_2017_2.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.smtbq.Al
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si_Zuo_JPCA2020.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/WBe_Wood_PRB2019.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CuH.bop.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_smf7.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni_smf7.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/AlCuH.bop.table
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ge_Zuo_JPCA2020.quadratic.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Al_jpc.agni
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni_Zuo_JPCA2020.quadratic.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_mishin1.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo_Zuo_JPCA2020.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CuTa_eam.poly
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC.gw
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ta06A.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ge_Zuo_JPCA2020.quadratic.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CuTa.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/charmm36.cmap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiO.1990.vashishta
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si_Zuo_JPCA2020.quadratic.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ta6.8x.mgpt.README
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.smtbq.TiO2
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ta4.mgpt.README
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/BNCH.ILP
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.ci-reax.CH
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/W_zhou.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ta6.8x.mgpt.parmin
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/W_2940_2017_2_He_JW2013.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_u3.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Al_zhou.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Pt_u3.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/README
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mg_mm.eam.fs
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/ffield.reax.cho
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Au_u3.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC_1990.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/SiC.vashishta
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/BNC_TS_bulk.ILP
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_zhou.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Si.edip
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Ni_Zuo_JPCA2020.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Cu_Zuo_JPCA2020.quadratic.snapparam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/AlCu.eam.alloy
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo5.2.mgpt.README
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Li_Zuo_JPCA2020.snapcoeff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/V6.1.mgpt.parmin
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Al_jnp.eam
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/V6.1.mgpt.README
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/BNC.tersoff
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CH.rebo
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/CH.KC
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/AlO.streitz
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Mo_Zuo_JPCA2020.quadratic.snap
-- Up-to-date: /home/vinayak/.local/share/lammps/potentials/Li_Zuo_JPCA2020.snapparam
-- Up-to-date: /home/vinayak/.local/etc/profile.d/lammps.sh
-- Up-to-date: /home/vinayak/.local/etc/profile.d/lammps.csh
-- Up-to-date: /home/vinayak/.local/lib/python3.8/site-packages/lammps.py

However, when i try to verify my installation in the python interpreter i get the following error:

Python 3.8.10 (default, Mar 15 2022, 12:22:08) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lammps
>>> lmp=lammps.lammps()
Traceback (most recent call last):
  File "/home/vinayak/.local/lib/python3.8/site-packages/lammps.py", line 152, in __init__
    if not name: self.lib = CDLL(join(modpath,"liblammps" + lib_ext),RTLD_GLOBAL)
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/vinayak/.local/lib/python3.8/site-packages/liblammps.so: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vinayak/.local/lib/python3.8/site-packages/lammps.py", line 156, in __init__
    if not name: self.lib = CDLL("liblammps" + lib_ext,RTLD_GLOBAL)
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: liblammps.so: cannot open shared object file: No such file or directory

Can you please inform me of what am i missing in this installation?

Here is the error message from the CMake command. That is an indication that you either are using the documentation for a newer version of LAMMPS compared to the version that you have downloaded or that you mistyped that path for the selected preset.

The location of your liblammps.so file is not in a folder that can be discovered by the shared linker. Since you did an installation to a “user” folder (i.e. ${HOME}/.local/) you have to make certain that the folder containing liblammps.so can be found, either by adding it to the /etc/ld.so.conf file or a file in the /etc/ld.so.conf.d folder or in the LD_LIBRARY_PATH environment variable.

I have referred to the steps given here . I checked that there’s no such file called basic.cmake in the presets directory in the github repo which is what i am using right now for building lammps. Could this be the issue?

This isn’t the official LAMPS repository.
The file basic.cmake do exist: lammps/cmake/presets at develop · lammps/lammps · GitHub

1 Like

This repo contains a version that is over two years old. It either needs to be updated or you have to follow the documentation that is included in that source. This would instead use a preset file called minimal.cmake.

We do not recommend using such an old version of LAMMPS due to the many bugfixes and improvements that were included since. There will be little if any help for you if you have problems.

1 Like