set-ntp在 Ubuntu 20.04 中,我发现由于以下错误而无法更改。
# timedatectl set-ntp true\nFailed to set ntp: NTP not supported\nRun Code Online (Sandbox Code Playgroud)\n有办法解决吗?
\n更新:
\n看来systemd-timesyncd启动命令失败了。
$ systemctl status systemd-timesyncd\n\xe2\x97\x8f systemd-timesyncd.service\n Loaded: masked (Reason: Unit systemd-timesyncd.service is masked.)\n Active: inactive (dead)\n$ sudo systemctl start systemd-timesyncd\nFailed to start systemd-timesyncd.service: Unit systemd-timesyncd.service is masked.\nRun Code Online (Sandbox Code Playgroud)\n解决方案
\n使用该命令,sudo timedatectl set-ntp yes问题现已解决。
当我想在我的电脑上制作 gcc 4.1.2 ( ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.1.2/gcc-4.1.2.tar.bz2 ) Ubuntu 12.04 (x86_64)。当前活动的 gcc 是 4.6.2。我做了:
./configure
Run Code Online (Sandbox Code Playgroud)
然后
make
Run Code Online (Sandbox Code Playgroud)
但是我收到这个错误
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
网上搜了一下,好像位置有问题crti。这些文件在系统上可用
# find /usr/ -name crti*
/usr/lib32/crti.o
/usr/lib/x86_64-linux-gnu/crti.o
/usr/lib/debug/usr/lib/x86_64-linux-gnu/crti.o
Run Code Online (Sandbox Code Playgroud)
还安装了 libc6 开发包
# dpkg -l | grep libc6
ii libc6 2.15-0ubuntu10.3 Embedded GNU C Library: Shared libraries
ii libc6-dbg 2.15-0ubuntu10.3 Embedded GNU C Library: detached debugging symbols
ii libc6-dev 2.15-0ubuntu10.3 Embedded GNU C Library: Development Libraries and …Run Code Online (Sandbox Code Playgroud) 如何防止其他 sudoer 运行apt-get install命令?其他命令,例如mount和其他命令都可以。
以前我在我的.bashrc文件中定义了一个变量。现在我source再次评论它和文件。然而,echo 命令仍然返回先前的值。
1)
$ echo $DB_ROOT
/home/mahmood/db-4.0
Run Code Online (Sandbox Code Playgroud)
2)
$ grep DB_ROOT .bashrc
#export DB_ROOT=/home/mahmood/db-4.0
#export DB_ROOT=/home/mahmood/db-4.0-default
#export SCRIPT_ROOT=$DB_ROOT/scripts
#export SCRIPT_ROOT2=$DB_ROOT/scripts
#export STAT_DIR=$DB_ROOT/stat-manager
#export CKPTDIR=$DB_ROOT/checkpoints
#export PATH=$SIMICS_ROOT/bin:$SIMICS_ROOT/amd64-linux/bin:$DB_ROOT/stat-manager:$PATH
Run Code Online (Sandbox Code Playgroud)
3)
$ source .bashrc
$ echo $DB_ROOT
/home/mahmood/db-4.0
Run Code Online (Sandbox Code Playgroud)
该source命令无效。我错过了另一个搜索位置吗?