Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating a file inside /etc/apt/sources.list.d/ [closed]

I am trying to install chef (from opscode) on ubuntu box. I am not much familiar with linux but I have to install chef on linux in quick time.

One of the steps installation guide says

Create /etc/apt/sources.list.d/opscode.list

What does this line mean? Now should I create a directory opscode.list or file?

/etc/apt/sources.list.d/ directory already exists.

When I try to fire following command ->

cd /etc/apt/sources.list.d/
mkdir opscode.list

I get following ->

mkdir: cannot create directory `opscode.list': Permission denied

How can I resolve the permission denied issue?

like image 653
user93796 Avatar asked May 02 '12 07:05

user93796


People also ask

What is ETC APT sources list D?

The file /etc/apt/sources. list contains a list of configured APT (Advanced Package Tool) data sources to fetch packages from the Internet or local repository on a Debian or Ubuntu Linux based system.

What is ETC APT sources list in Ubuntu?

Ubuntu uses the APT (Advanced Package Tool) package manager to manage packages. The APT package manager and all the graphical front ends (Ubuntu Software Center, Muon, aptitude etc) uses the sources. list file to learn about which package repository or repositories to use.


1 Answers

use sudo:

sudo vi /etc/apt/sources.list.d/opscode.list

or maybe via echo:

sudo echo "deb http://apt.opscode.com/ <codename> main" > /etc/apt/sources.list.d/opscode.list

When asked for a password, type in YOUR password (not the one from root).

Replace "<codename>" with whatever is needed (according to the tutorial):

  • For Chef 0.9.x, replace codename with the supported distribution codename, such as "lucid".
  • For Chef 0.10.x, replace codename with the codename, suffixed with "-0.10", for example, "lucid-0.10".
like image 123
Dariop Avatar answered Nov 09 '22 01:11

Dariop