Ubuntu

Ubuntu用户和开发人员的问答

1
如何解决警告:命令替换:在输入中忽略了空字节?
我有一个运行的脚本,该脚本需要使用notify-send,但以root身份运行。我发现唯一可行的方法是此脚本。问题是在这条线上: DBUS_SESSION=`grep -z DBUS_SESSION_BUS_ADDRESS /proc/$DBUS_PID/environ | sed -e s/DBUS_SESSION_BUS_ADDRESS=//` 我不断收到错误 warning: command substitution: ignored null byte in input 如何修复或禁止显示错误消息? 顺便说一句,下面的内容不会压制它: 2> /dev/null > /dev/null >> /dev/null > /dev/null 2>&1 2>&1

4
systemd-resolved不会向dns服务器查询本地域
由于升级到17.04,因此我无法再解析本地网络(silvesternet.local)中的地址。我得到以下回应: $ systemd-resolve edgerouter edgerouter: resolve call failed: No appropriate name servers or networks for name found 在日志中,仅存在与此查询相关的事务超时报告。 我使用Wireshark来嗅探网络流量,似乎它甚至没有尝试查找名称。没有任何dns流量。查找另一个外部域就可以了。 围绕同一主题的许多问题都提到更改nsswitch.conf,但这似乎无济于事。我当前的设置是: hosts: files mdns4_minimal dns [NOTFOUND=return] resolve [!UNAVAIL=return] mdns4
12 networking  dns 

2
Ubuntu 16.04 VPN服务上的VPN L2TP / IPSec客户端无法启动
在Ubuntu 16.04上,我已经遵循了一些教程来重建网络管理器,它们也可以通过安装apt-get install network-manager-l2tp network-manager-l2tp-gnome。 一直工作到昨天,直到随机消息说The VPN connection failed because the VPN service failed to start。配置上没有错误,因为在另一个Ubuntu 16.04和Windows 8.1中使用了相同的VPN凭据和主机。 看/var/log/syslog: NetworkManager[899]: <info> [1496143714.1953] audit: op="connection-activate" uuid="cac1651d-9cbd-4989-bc57-b9707ddd012a" name="VPNCS" pid=2295 uid=1000 result="success" NetworkManager[899]: <info> [1496143714.1973] vpn-connection[0xa56420,cac1651d-9cbd-4989-bc57-b9707ddd012a,"VPNCS",0]: Started the VPN service, PID 5798 NetworkManager[899]: <info> [1496143714.2013] vpn-connection[0xa56420,cac1651d-9cbd-4989-bc57-b9707ddd012a,"VPNCS",0]: Saw the service appear; activating connection NetworkManager[899]: …

3
使用SMB 2.1或更高版本挂载Windows Share
我试图使用Ubuntu 12.04(使用内核3.13.0-117-generic)挂载Windows托管的SMB共享(CIFS)。使用SMB1进行安装是可行的,但这是不可接受的,我们必须改为使用SMB2.1或更高版本进行安装。 以下是我通过传递ver =参数来执行此操作的输出 root@----:/# mount -t cifs //SERVER/smbtest /mnt/smbtest --verbose -o ver=2.1,user=administrator Password: mount.cifs kernel mount options: ip=10.16.0.40,unc=\\server.domain.net\smbtest,ver=2.1,ver=1,user=administrator,pass=******** mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 如您所见,在mount.cifs内核安装选项中有两个ver参数,一个是我指定的参数,另一个是默认参数(1)。如果我为ver指定的值不是1或1.0,则会发生这种情况。 已安装cifs-utils 5.1版,而cifs.ko在2.02版上。在Samba Wiki上的SMB3内核状态页面上,https: //wiki.samba.org/index.php/SMB3_kernel_status , "The minimum version for use of the Linux kernel SMB3 support is …

2
卸载python 3.6
遵循本指南“ 使用暂存站点测试部署”,我已使用以下命令在Ubuntu 16.04上安装了python 3.6: sudo add-apt-repository ppa:fkrull/deadsnakes sudo apt-get update sudo apt-get install python3.6 不幸的是,我现在想使用anaconda软件包管理器,因此为了避免冲突,我想删除升级的所有痕迹。怎么样?
12 16.04  python 

4
在Ubuntu 17.04中安装Powershell
我正在尝试按照以下步骤在Ubuntu 17.04中安装Powershell: curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list sudo apt-get update sudo apt-get install -y powershell 我知道我使用的是16.04软件包/已安装。不幸的是我找不到17.04。 这是我遇到的错误 sudo apt-get install -y powershell The following packages have unmet dependencies: powershell : Depends: libicu55 but it is not installable 然后我尝试了: apt-cache search libicu 我找不到要安装的libicu55。有什么方法可以在Ubuntu …
12 17.04  powershell 

4
更改/ var / www / html的权限
我已经研究了这个主题https://help.ubuntu.com/community/FilePermissions一段时间,由于某种原因而无法使其正常工作。 特别是,这些行最让我感兴趣: 要一次更改指定目录下每个文件和文件夹的所有权限,请使用带有-R的sudo chmod $ sudo chmod 777 -R /path/to/someDirectory $ ls -l total 3 -rwxrwxrwx 1 user user 0 Nov 19 20:13 file1 drwxrwxrwx 2 user user 4096 Nov 19 20:13 folder -rwxrwxrwx 1 user user 0 Nov 19 20:13 file2 这是我输入的内容: mark@ubuntuserver:~$ sudo chmod 755 /var/www/html mark@ubuntuserver:~$ ls …

3
解压缩特定目录而不创建顶层目录
我有一个ZIP文件,其中有一个存储所有文件的顶级目录: Release/ Release/file Release/subdirectory/file Release/subdirectory/file2 Release/subdirectory/file3 我想提取所有内容Release,以保留目录结构,但是在运行此命令时: unzip archive.zip Release/* -d /tmp 它创建顶部Release文件夹: /tmp/Release/ /tmp/Release/file /tmp/Release/subdirectory/file /tmp/Release/subdirectory/file2 /tmp/Release/subdirectory/file3 我如何在Release 不创建Release文件夹的情况下提取其中的所有内容,如下所示: /tmp/ /tmp/file /tmp/subdirectory/file /tmp/subdirectory/file2 /tmp/subdirectory/file3

2
如何使用Evince保存/覆盖带注释的文件?
我正在使用预安装的Document Viewer(Evince)注释pdf文件。似乎没有“保存”选项,在“保存副本”下,我需要单击文件夹以手动找到pdf位置,因为默认情况下保存位置不是原始pdf位置。(“打开包含文件夹”将打开正确的文件夹,但在“保存副本”下,默认值为“桌面”。) 我觉得应该可以简化工作流程。你有好主意吗?

3
找不到设备eth0
我是ubuntu的新手,需要安装ubuntu xenial服务器(16.04)版才能将MongoDB安装到VirtualBox中。安装后,我尝试从dhcp更改为静态ipv4地址。所以我改变了/ etc / network / interfaces: auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet static address 192.168.56.5 netmask 255.255.255.0 gateway 192.168.56.1 并重新启动服务器 # but ifconfig -a shows only an enp0s3 interface without any IP address and lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 …

1
Google Chrome:错误21(net :: ERR_NETWORK_CHANGED)
在Kubuntu 17.04 Zesty上,我不断收到错误21(net :: ERR_NETWORK_CHANGED)。刷新后,页面加载良好。由于此错误,我的下载也被中断。在Firefox上一切正常。 该错误的原因是什么?我不认为这是由WiFi驱动程序引起的,因为在其他网络浏览器上,我没有出现任何错误。 sudo apt list google-chrome-stable google-chrome-stable/stable,now 56.0.2924.87-1 amd64 [installed] lspci | grep -i network 02:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01) sudo modprobe ath9k && dmesg | grep ath [ 20.522563] ath: phy0: WB335 1-ANT card detected [ 20.522564] …

1
Dell XPS 15 2017上的Ubuntu 17.04中的指纹读取器
是否可以在Dell XPS 15 9560(2017)的Ubuntu 17.04中启用指纹读取器?我怎么做?我测试了指纹GUI,但显示“找不到设备”。 编辑: ➜ ~ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 04f3:24a0 Elan Microelectronics Corp. Bus 001 Device 003: ID 138a:0091 Validity Sensors, Inc. Bus 001 Device 002: ID 0cf3:e300 Atheros Communications, Inc. Bus 001 Device …

2
“ libmtp错误:无法从设备获取文件。” 尝试从Android手机传输文件
我试图将文件从OnePlus X And​​roid手机传输到相当新鲜的Ubuntu 16.10安装中。安装电话后(我可以看到文件,浏览文件系统等),当我尝试将文件从电话传输到Ubuntu系统时,出现以下错误消息: libmtp error: Could not get file from device. 这里可能出什么问题了?我之前已经安装libmtpserver-dev和mtp-server。
12 android  16.10  mtp 



By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.