apt

Installing g++ on windows subsystem for linux

房东的猫 提交于 2019-12-03 15:50:36
A while back I activated Windows Subsystem for Linux on my machine but didn't use it much. Now I have an idea what I could use it for and that is why I'm trying to install gcc/++ 7 on my WSL and keep running into problems. My idea was to download it and compile it by hand following this guide with: ../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=${HOME}/software/gcc-7.3.0/installDir --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib This led to the following error: checking build system type... x86_64-pc-linux

Handling input confirmations in Linux shell scripting

青春壹個敷衍的年華 提交于 2019-12-03 12:48:58
问题 I'm writing a Linux Shell Script to automate a few things I'm doing on Ubuntu 11.04. Basically, I'm writing a shell script to install NGINX, MySQL, and PHP, and then configure everything. I know how to do everything via the command-line. However, I don't know how I'm going to handle the parts where the process asks for user input. For example, certain things I install with apt-get ask you for a confirmation i.e. (Y)es or (N)o. How exactly would I handle auto-confirmation in the shell script i

Debian: Listing all user-installed packages?

谁说我不能喝 提交于 2019-12-03 12:03:20
For a cyber security competition I participate in, I'm given a Debian virtual machine with many packages installed and asked to clean extraneous or malicious packages. In the past, I've used dpkg -l | grep [searchterm] and a list of common packages to preform this task. However, this is extremely inefficient and time-consuming. To speed up my task, is there any way to search through the list of packages installed on a system for which processes have been installed by a user and are not system "default" packages? This command may shorten your work: apt-mark showmanual It is supposed to show

“InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)” when updating package list

梦想的初衷 提交于 2019-12-03 10:55:04
问题 Here is what I see in my terminal: user@user-OptiPlex-9020:~$ sudo apt-get update Ign http://extras.ubuntu.com trusty InRelease Ign http://in.archive.ubuntu.com trusty InRelease Get:1 http://dl.google.com stable InRelease 100% [1 InRelease gpgv 1,661 B] [Connecting to 192.168.0.90 (192.168.0.90)] [WaSplitting up /var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stable_InRelease intoIgn http://dl.google.com stable InRelease E: GPG error: http://dl.google.com stable InRelease:

Mongodb installation Ubuntu 12.04 LTS

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: My mongodb installation isn't working very well. I added a place in /etc/apt/sources.list, but I get an error message that there is a duplicate in an entry between the i386 packages and amd64 packages? I tried an update, but it doesn't work. 回答1: In this how-to-install-mongodb-on-ubuntu , each step was well explained. I tried and it went well as expected. Good luck! :) 回答2: Its easy to install mongodb in ubuntu. Step 1 : Search for the mongodb package avaliable but initially it may not be present sudo apt - cache search mongodb

How to make Debian package install dependencies?

為{幸葍}努か 提交于 2019-12-03 09:14:38
问题 I want to make a simple Debian package to install a simple tool that depends on Qt4 libs. In control file I have defined that it depends on Qt4 libs however, by the time I'm testing the package it says that the dependency could not be met. Question: How can I make Debian trigger apt to install the dependencies as well? Can't find that the documentation however I know that apt-get does that. 回答1: If you want to avoid creating a local APT repository, you can do: dpkg -i mypackage.deb apt-get

Ubuntu通过apt-get方式搭建lnmp环境以及php扩展安装

三世轮回 提交于 2019-12-03 08:29:27
一直是在用的lnmp的集成安装包搭建lnmp环境,因为工作需要需要安装ldap扩展,在网上怎么都找不到源码安装包,只能卸载掉原来的lnmp环境,用ubuntu的php5-ldap扩展,在安装中遇到一些问题,网上的文章坑爹的比较多,写篇文章记录下来。 1.安装mysql sudo apt-get install mysql-server mysql-client 安装过程中要输入root用户的密码。 我在安装中出错,是原来的mysql-cilent mysql-workbench 未完全卸载,将mysql组件完全卸载的方法: 删除mysql前 先删除一下 /var/lib/mysql 还有 /etc/mysql sudo rm /var/lib/mysql/ -R sudo rm /etc/mysql/ -R sudo apt-get autoremove mysql* --purge sudo apt-get remove apparmor 全部删除之后再执行 apt-get install mysql-server mysql -client 2.安装nginx sudo apt-get install nginx 3.安装成功后。我们重启下nginx服务 sudo service nginx restart<span style='font-family: "Microsoft

Requirements file for apt-get, similar to pip

北战南征 提交于 2019-12-03 08:27:56
问题 I like how you can manage dependencies with pip requirements. Is there something similar in case of apt-get? http://www.pip-installer.org/en/latest/requirements.html#requirements-file-format 回答1: Your question is that you want to have a list of system dependences in one file, for being able to install it with one command. I don't recomend you to include the version of a package in the system dependencies. In the soft system dependences like " build-essential " or " uuid-dev " you normally

linux下无法获得锁问题解决

≡放荡痞女 提交于 2019-12-03 07:41:19
E: 无法获得锁 /var/cache/apt/archives/lock - open (11: 资源暂时不可用) E: 无法对目录 /var/cache/apt/archives/ 加锁 sudo /var/cache/apt/archives/lock #如果还不行,继续下面命令: sudo rm /var/lib/dpkg/lock ok,问题解决! 看起来都有点暴力,其他的办法: ps -aux 找到apt-get的PID 然后,sudo kill pid 同样解决! 问题原因,操作系统锁的机制。 来源: oschina 链接: https://my.oschina.net/u/250670/blog/57123

Can't remove, purge, unistall mongodb from debian

◇◆丶佛笑我妖孽 提交于 2019-12-03 06:38:48
I'm trying to reinstall it, because it has problems. For example, I can't install Chromium because mongodb-org-server is not configured. But I can't even remove it for the same reason. apt-get autoremove --purge mongodb Or: apt-get purge mongodb Or: apt-get remove --purge mongodb All end in the same way: dpkg: error processing package mongodb-org-server (--configure): subprocess installed post-installation script returned error exit status 102 Errors were encountered while processing: mongodb-org-server E: Sub-process /usr/bin/dpkg returned an error code (1) Some data about my machine from