安装/构建 open-afs 客户端时遇到问题

安装/构建 open-afs 客户端时遇到问题

我在安装 OpenAFS 客户端 Ubuntu 20.10 时遇到问题

> sudo add-apt-repository ppa:openafs/stable
> sudo apt-get install openafs-krb5 openafs-client

Building initial module for 5.11.0-7614-generic
ERROR (dkms apport): kernel package linux-headers-5.11.0-7614-generic is not supported
Error! Bad return status for module build on kernel: 5.11.0-7614-generic (x86_64)
Consult /var/lib/dkms/openafs/1.8.6/build/make.log for more information.
dpkg: error processing package openafs-modules-dkms (--configure):
 installed openafs-modules-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 openafs-modules-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish

附加日志:

> cat /var/lib/dkms/openafs/1.8.6/build/make.log
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/config/Makefile
config.status: creating src/config/Makefile.config
config.status: creating src/config/Makefile.lwp
config.status: creating src/config/Makefile.version-CML
config.status: creating src/config/Makefile.version-NOCML
config.status: creating src/libafs/Makefile.common
config.status: creating src/libafs/MakefileProto
config.status: creating src/config/afsconfig.h
cd src && cd config && make
make[1]: Entering directory '/var/lib/dkms/openafs/1.8.6/build/src/config'
rm -f Makefile.version
if  [ -r /var/lib/dkms/openafs/1.8.6/build/src/CML/state ] ; \
then    cp Makefile.version-CML Makefile.version ; \
else    cp Makefile.version-NOCML Makefile.version ; \
fi
make -f Makefile.version AFS_component_version_number.c
make[2]: Entering directory '/var/lib/dkms/openafs/1.8.6/build/src/config'
( VERSION=`/var/lib/dkms/openafs/1.8.6/build/build-tools/git-version /var/lib/dkms/openafs/1.8.6/build "1.8.6-5~ppa0~ubuntu20.10.1-debian"` && \
if [ "$SOURCE_DATE_EPOCH" ]; then \
     echo 'char cml_version_number[]="@(#)OpenAFS '$VERSION `date -u -d "@$SOURCE_DATE_EPOCH" +"%Y-%m-%d" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" +"%Y-%m-%d"`'";'; \
else \
     echo 'char cml_version_number[]="@(#)OpenAFS '$VERSION `date +"%Y-%m-%d"` $USER@`hostname`'";'; \
fi >AFS_component_version_number.c.NEW && \
echo 'char* AFSVersion = "openafs '$VERSION'";' >>AFS_component_version_number.c.NEW && \
if cmp AFS_component_version_number.c.NEW AFS_component_version_number.c > /dev/null 2>&1 ; then : ; else \
mv AFS_component_version_number.c.NEW AFS_component_version_number.c ; fi )
rm -f AFS_component_version_number.c.NEW
make[2]: Leaving directory '/var/lib/dkms/openafs/1.8.6/build/src/config'
gcc -fPIC     -O   -I/var/lib/dkms/openafs/1.8.6/build/src/config -I/var/lib/dkms/openafs/1.8.6/build/include -I. -I.      -o config.o -c config.c
gcc -fPIC     -O   -I/var/lib/dkms/openafs/1.8.6/build/src/config -I/var/lib/dkms/openafs/1.8.6/build/include -I. -I.      -o mc.o -c mc.c
gcc   -L/var/lib/dkms/openafs/1.8.6/build/lib -L/var/lib/dkms/openafs/1.8.6/build/lib  -O      -O   -I/var/lib/dkms/openafs/1.8.6/build/src/config -I/var/lib/dkms/openafs/1.8.6/build/include -I. -I.      -o config config.o mc.o
gcc     -O   -I/var/lib/dkms/openafs/1.8.6/build/src/config -I/var/lib/dkms/openafs/1.8.6/build/include -I. -I.       -L/var/lib/dkms/openafs/1.8.6/build/lib -L/var/lib/dkms/openafs/1.8.6/build/lib  -O   \
    -o mkvers ./mkvers.c
if [ "Xparam.linux26.h" != "X" ] ; then \
    cat ./param.linux26.h ./param.amd64_linux26.h > param.h.new ; \
else \
    cat ./param.amd64_linux26.h > param.h.new ; \
fi
/bin/install -c -m 644 param.h.new /var/lib/dkms/openafs/1.8.6/build/include/afs/param.h
make[1]: Leaving directory '/var/lib/dkms/openafs/1.8.6/build/src/config'
src/config/config src/libafs/MakefileProto \
    src/libafs/Makefile amd64_linux26
Wrote new makefile 'src/libafs/Makefile'.
cd src && cd libafs && make
make[1]: Entering directory '/var/lib/dkms/openafs/1.8.6/build/src/libafs'
rm -f h net netinet sys rpc
ln -fs rx rpc
for m in SP ; do \
    KDIR=MODLOAD-5.11.0-7614-generic-$m; \
    mkdir -p ${KDIR}; \
    ln -fs ../Makefile ${KDIR}/Makefile.afs ; \
    ln -fs ../Makefile.common ${KDIR}/Makefile.common; \
    ln -fs ../config ${KDIR}/config; \
done 
rm -f h 
rm -f sys
rm -f netinet 
if [ -d /lib/modules/5.11.0-7614-generic/build/include2 ] ; then                  \
    ln -fs /lib/modules/5.11.0-7614-generic/build/include2/asm/../linux h       ; \
    ln -fs /lib/modules/5.11.0-7614-generic/build/include2/asm/../linux sys     ; \
    ln -fs /lib/modules/5.11.0-7614-generic/build/include2/asm/../linux netinet ; \
else                                                            \
    ln -fs /lib/modules/5.11.0-7614-generic/build/include/linux h               ; \
    ln -fs /lib/modules/5.11.0-7614-generic/build/include/linux sys             ; \
    ln -fs /lib/modules/5.11.0-7614-generic/build/include/linux netinet         ; \
fi
rm -f linux 
ln -fs /lib/modules/5.11.0-7614-generic/build/include/linux linux 
rm -f net 
ln -fs /lib/modules/5.11.0-7614-generic/build/include/net net 
rm -f asm-generic
ln -fs /lib/modules/5.11.0-7614-generic/build/include/asm-generic asm-generic
rm -f asm
ln -fs /lib/modules/5.11.0-7614-generic/build/include/asm-x86_64 asm
if [ "yes" ] ; then \
    TARGPREFIX="pack_"; \
fi ; \
for m in SP ; do \
    KDIR=MODLOAD-5.11.0-7614-generic-$m ; \
    echo Building in directory: ${KDIR} ; \
    if [ "$m" = "MP" ] ; then \
        SMP_DEF="-DAFS_SMP  " ; \
        TARG="libafs.mp" ; \
    elif [ "$m" = "EP" ] ; then \
        SMP_DEF="-DAFS_SMP  " ; \
        TARG="libafs.ep" ; \
    elif [ "$m" = "BM" ] ; then \
        SMP_DEF="-DAFS_SMP  " ; \
        TARG="libafs.bm" ; \
    else  \
        SMP_DEF=" " ; \
        TARG=libafs ; \
    fi ; \
    cd ${KDIR} ; \
    make -f Makefile.afs SMP_DEF="${SMP_DEF}" linux_compdirs_${TARGPREFIX}${TARG} CLIENT=5.11.0-7614-generic KDIR=${KDIR} || exit $?; \
    cd ../ ; \
done
Building in directory: MODLOAD-5.11.0-7614-generic-SP
make[2]: Entering directory '/var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP'
env EXTRA_CFLAGS="" /var/lib/dkms/openafs/1.8.6/build/src/libafs/make_kbuild_makefile.pl MODLOAD-5.11.0-7614-generic-SP openafs.ko /var/lib/dkms/openafs/1.8.6/build/src/config/Makefile.config Makefile.afs Makefile.common
( env EXTRA_CFLAGS="" \
    make -C /lib/modules/5.11.0-7614-generic/build M=/var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP modules 2>&1 \
    || echo "FAILURE: make exit code $?" ) | tee .makelog
make[3]: Entering directory '/usr/src/linux-headers-5.11.0-7614-generic'
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/sha256-kernel.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/rand-timer-kernel.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_atomlist.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_lhash.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_analyze.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_axscache.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_buffer.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_bypasscache.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_callback.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_cbqueue.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_cell.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_chunk.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_conn.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_daemons.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_dcache.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_dir.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_disconnected.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_dynroot.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_error.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_icl.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_init.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_lock.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_mariner.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_memcache.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_fetchstore.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_osi.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_osidnlc.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_osi_alloc.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_osi_pag.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_osi_uio.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_osi_vget.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_osi_vm.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_segments.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_server.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_stat.o
  CC [M]  /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_syscall.o
In file included from ./arch/x86/include/asm/preempt.h:7,
                 from ./include/linux/preempt.h:78,
                 from ./include/linux/spinlock.h:51,
                 from ./include/linux/wait.h:9,
                 from /var/lib/dkms/openafs/1.8.6/build/src/afs/sysincludes.h:118,
                 from /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_syscall.c:18:
/var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_syscall.c: In function ‘copyin_afs_ioctl’:
/var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_syscall.c:127:26: error: ‘TIF_IA32’ undeclared (first use in this function)
  127 |     if (test_thread_flag(TIF_IA32))
      |                          ^~~~~~~~
./include/linux/thread_info.h:131:45: note: in definition of macro ‘test_thread_flag’
  131 |  test_ti_thread_flag(current_thread_info(), flag)
      |                                             ^~~~
/var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_syscall.c:127:26: note: each undeclared identifier is reported only once for each function it appears in
  127 |     if (test_thread_flag(TIF_IA32))
      |                          ^~~~~~~~
./include/linux/thread_info.h:131:45: note: in definition of macro ‘test_thread_flag’
  131 |  test_ti_thread_flag(current_thread_info(), flag)
      |                                             ^~~~
/var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_syscall.c: In function ‘copyin_iparam’:
/var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_syscall.c:404:26: error: ‘TIF_IA32’ undeclared (first use in this function)
  404 |     if (test_thread_flag(TIF_IA32))
      |                          ^~~~~~~~
./include/linux/thread_info.h:131:45: note: in definition of macro ‘test_thread_flag’
  131 |  test_ti_thread_flag(current_thread_info(), flag)
      |                                             ^~~~
make[4]: *** [scripts/Makefile.build:287: /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP/afs_syscall.o] Error 1
make[3]: *** [Makefile:1848: /var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP] Error 2
make[3]: Leaving directory '/usr/src/linux-headers-5.11.0-7614-generic'
FAILURE: make exit code 2
make[2]: *** [Makefile.afs:279: openafs.ko] Error 1
make[2]: Leaving directory '/var/lib/dkms/openafs/1.8.6/build/src/libafs/MODLOAD-5.11.0-7614-generic-SP'
make[1]: *** [Makefile:186: linux_compdirs] Error 2
make[1]: Leaving directory '/var/lib/dkms/openafs/1.8.6/build/src/libafs'
make: *** [Makefile:15: all] Error 2

我感谢任何帮助或提示。

答案1

你正在运行的内核版本5.11.0-7614-generic不受支持。你必须使用以下命令安装官方内核:

sudo apt autopurge $(dpkg -S $(uname -r) | awk -F: '{print $1}' | sed "s/,//g" | sort -u)
sudo apt-get install linux-image-generic linux-headers-generic

然后重新启动。

然后,您必须从官方存储库安装包,而不是从第三方编译包。

使用以下方法清除 PPA

sudo apt-get install ppa-purge
sudo ppa-purge ppa:openafs/stable

然后安装相同的包裹来自官方存储库

sudo apt-add-repository universe
sudo apt-get install openafs-krb5 openafs-client

相关内容