AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-208148

klor's questions

Martin Hope
klor
Asked: 2024-08-05 15:20:56 +0800 CST

无法将 ISCSI 磁盘挂载点更改为其他目录

  • 5

问题:我无法将 ISCSI 磁盘挂载点更改为其他目录。

目前我已将 ISCSI 磁盘安装到 /iscsi2

我想将其更改为 /iscsi

我在 /etc/fstab 中将 /iscsi2 更改为 /iscsi,但挂载到 /iscsi 失败。

复现步骤:

  1. 根据 /etc/fstab 挂载 /iscsi2。失败,因为挂载点已重命名为 /iscsi

    mount /iscsi2
    mount: can't find /iscsi2 in /etc/fstab
    
  2. 根据设备路径挂载/iscsi2,成功。

    mount /dev/sdd1 /iscsi2
    
  3. 表明已经安装:

    lsblk -af | grep -i iscsi
    L¦sdd1 ext4   ISCSI_Backup2    3829ed05-f445-425d-8213-3b1c2d41fba /iscsi2
    
  4. 卸载 /iscsi2:

    umount /iscsi2
    
  5. 显示它已被卸载:

    lsblk -af | grep -i iscsi
    L¦sdd1 ext4   ISCSI_Backup2    3829ed05-f445-425d-8213-3b1c2d41fba
    
  6. 根据设备路径挂载 /iscsi。失败。

    mount /dev/sdd1 /iscsi
    
  7. 显示它仍处于未安装状态:

    lsblk -af | grep -i iscsi
    L¦sdd1 ext4   ISCSI_Backup2    3829ed05-f445-425d-8213-3b1c2d41fba
    

知道为什么挂载到 /iscsi2 成功而挂载到 /iscsi 却失败吗?

linux
  • 1 个回答
  • 26 Views
Martin Hope
klor
Asked: 2020-02-28 13:12:09 +0800 CST

Debian 9.12 中的 libc6 依赖项不匹配

  • 0

我在 Debian 9.12 中遇到了以下 libc6 依赖问题。

sudo apt install libc6-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6-dev : Depends: libc6 (= 2.24-11+deb9u4) but 2.27-6 is to be installed
             Depends: libc-dev-bin (= 2.24-11+deb9u4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我该如何解决?

EDIT1:apt策略libc6

libc6:
  Installed: 2.27-6
  Candidate: 2.27-6
  Version table:
 *** 2.27-6 100
        100 /var/lib/dpkg/status
     2.24-11+deb9u4 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages
     2.24-11+deb9u1 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages

编辑2:

sudo apt install libc6/stable libc6-bin/stable locales/stable
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Release 'stable' for 'libc6' was not found
E: Unable to locate package libc6-bin
E: Release 'stable' for 'locales' was not found
debian dependencies
  • 2 个回答
  • 1064 Views
Martin Hope
klor
Asked: 2019-08-12 21:52:01 +0800 CST

Moodle 3.7 & Apache & 反向代理结果 ERR_TOO_MANY_REDIRECTS

  • 0

具有反向代理结果 ERR_TOO_MANY_REDIRECTS 的 Moodle 3.7 Apache。

我有一个带有以下 vhosts 文件的 SSL 站点:

<VirtualHost *:80>
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>     


<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName moodle.site.com:443

SSLEngine on
SecAuditEngine On
RewriteEngine On

    ProxyPreserveHost On
    ProxyPass / http://101.102.103.104:80/
    ProxyPassReverse / http://101.102.103.104:80/

</VirtualHost>                                  
</IfModule>

我还将所有 80 个端口请求重定向到 SSL 端口。

命令

curl -I https://moodle.site.com/

结果:

HTTP/1.1 303 See Other
Date: Fri, 09 Aug 2019 19:13:33 GMT
Server: Apache/2.4.38 (Debian)
Strict-Transport-Security: max-age=15768000; includeSubDomains
Location: https://moodle.site.com
Content-Language: en
Content-Type: text/html; charset=UTF-8

在 Moodle config.php 我有:

$CFG->wwwroot   = 'https://moodle.site.com';
$CFG->reverseproxy = true;
$CFG->sslproxy  = 1;

知道为什么当我尝试打开https://moodle.site.com URL 时在 Google Chrome 中出现“ERR_TOO_MANY_REDIRECTS”错误吗?

apache-httpd reverse-proxy
  • 1 个回答
  • 1395 Views
Martin Hope
klor
Asked: 2018-09-24 09:33:30 +0800 CST

在 Debian 9 Stretch 上安装 mysql-server 时出错(依赖问题)

  • 1

使用 Debian 9.5,全新安装。我想安装mysql-server,但遇到了依赖问题。

sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mysql-server : Depends: default-mysql-server but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

apt-get install mysql-server default-mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 default-mysql-server : Depends: mariadb-server-10.1 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt-get install mysql-server default-mysql-server mariadb-server-10.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mariadb-server-10.1 : Depends: libdbi-perl but it is not going to be installed
                       Recommends: libhtml-template-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt-get install mysql-server default-mysql-server mariadb-server-10.1 libhtml-template-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libhtml-template-perl : Depends: libcgi-pm-perl but it is not going to be installed or
                                  perl (< 5.19) but 5.26.2-7 is to be installed
 mariadb-server-10.1 : Depends: libdbi-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt-get install mysql-server default-mysql-server mariadb-server-10.1 libdbi-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libdbi-perl : Depends: perlapi-5.24.1
E: Unable to correct problems, you have held broken packages.

编辑1 apt-cache policy::

apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://security.debian.org/debian-security stretch/updates/contrib amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=contrib,b=amd64
     origin security.debian.org
 500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://deb.debian.org/debian stretch-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian stretch/main amd64 Packages
     release v=9.5,o=Debian,a=stable,n=stretch,l=Debian,c=main,b=amd64
     origin deb.debian.org
Pinned packages:

apt policy perl perl-base编辑2 ::

apt policy perl perl-base
perl:
  Installed: 5.26.2-7
  Candidate: 5.26.2-7
  Version table:
 *** 5.26.2-7 100
        100 /var/lib/dpkg/status
     5.24.1-3+deb9u4 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
perl-base:
  Installed: 5.26.2-7
  Candidate: 5.26.2-7
  Version table:
 *** 5.26.2-7 100
        100 /var/lib/dpkg/status
     5.24.1-3+deb9u4 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages

如何解决这些依赖问题?

debian apt
  • 3 个回答
  • 5116 Views
Martin Hope
klor
Asked: 2018-01-22 22:57:37 +0800 CST

为什么 sed 命令可以交互工作,但不能在我的脚本中工作?[复制]

  • 4
这个问题在这里已经有了答案:
如何在 sed 替换的 LHS 和 RHS 中使用变量? (9 个回答)
为什么我的 shell 脚本会因空格或其他特殊字符而窒息? (6 个回答)
'和'在命令行(bash)上的区别?[重复] 2个答案
4年前关闭。

SED 命令不能在 Debian 下的 bash 中替换,但可以在命令行中使用。

在命令行中工作:

sed -i 's|/dev/disk/by-label/SR6D4|/dev/disk/by-label/SR4D4|g' /etc/my/config.xml

不在 bash 脚本中工作,不替换字符串:

from="SR6D4"
to="SR4D4"
path_from="/dev/disk/by-label/${from}"
path_to="/dev/disk/by-label/${to}"
echo "sed -i 's|${path_from}|${path_to}|g' $file"
sed -i 's|${path_from}|${path_to}|g' $file

为什么在bash中使用sed时不替换文件中的字符串?

bash shell-script
  • 2 个回答
  • 19361 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve